# Select same file

**URL:** https://resource.dopus.com/t/select-same-file/18661
**Category:** Help & Support
**Created:** [July 1, 2014, 6:57am UTC](https://resource.dopus.com/t/select-same-file/18661 "2014-07-01T06:57:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tangy](https://resource.dopus.com/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@Tangy](https://resource.dopus.com/u/Tangy)
#### Post date: [July 1, 2014, 6:57am UTC](https://resource.dopus.com/t/select-same-file/18661/1 "2014-07-01T06:57:11Z")

</div>

Hello,

I have create a button which select a file in the duallister at the source and at the destination:

`Set SOURCE=toggle // change destination and source
Select DESELECT ALLFILES // deselect all files at the "old" destination (because selected files are still selected after I call "Select SOURCETODEST")
Set SOURCE=toggle // change destination and source again
Select SOURCETODEST // select same file at source and destination
/MyFolder\Merge\ecmerge.exe {filepath$} {filepathdest$} // compare files
@nodeselect`

The problem is, this only works when on the destination side one or more files are selected. Is no file is selected on the destination side the button not works.

Which is the correct solution for my problem?

By the way: How i can make comments at the code? I just use only here in my post c++ comments.

Albert

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [July 1, 2014, 9:40am UTC](https://resource.dopus.com/t/select-same-file/18661/2 "2014-07-01T09:40:34Z")

</div>

You don't need to select the destination file at all. Instead:

```auto
/MyFolder\Merge\ecmerge.exe {filepath$} {destpath$}{file$}
```

You might find using the [External Compare and Merge Tools Script](https://resource.dopus.com/t/external-compare-and-merge-tools-1-8/18570/1) even better.

---

<div class="post-metadata">

### Author: ![Tangy](https://resource.dopus.com/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@Tangy](https://resource.dopus.com/u/Tangy)
#### Post date: [July 1, 2014, 10:33am UTC](https://resource.dopus.com/t/select-same-file/18661/3 "2014-07-01T10:33:47Z")

</div>

Yes this it is to much easy for me, so I not find it 😊

Thanks 👍
