<Compare> button in "Confirm File Delete" box

In case I'm not sure if I want to overwrite a file, I'd like to be able to run a file comparison tool (WinDiff, BeyondCompare, etc.) from the "Confirm File Delete" box. Thus the current source and target file would be compared.

Does anyone else desire this?

Yes, see here: [How to enhance "Confirm File Replace" Dialog?)

Regards, Norbert

Thanks, Norbert.

I hope users who want this will note their desire by replying to that earlier post you've linked to.

I suggested it to GPSoft a few days ago and Dr. Perry replied:

[quote]Thanks for the suggestion. Frankly we don't see the real point in this. For the purposes of a copy then it's almost impossible to have files of the same time/date and size that are different.

You can do a similar think before the copy in two ways. One is to use the
Advanced Select and set the match equation to say 'Compare' then you can choose how to compare. Two is to use the Synchronize system in Opus which offers more comparison functions.

If you need to compare files - for example source files etc then I recommend you set up a button to use a comparison tool in a dual display Lister with a program such as WinDif where you'd use the command

C:\Program Files\Microsoft SDK\Bin\WinDiff.Exe {filepath} {filepathdest}[/quote]

but none of those suggestsions replace my desire for a button in the "Compare File Replace" box.

Can anyone offer a better solution?

Maybe an okay (but not great) substitute would be to use some keywords similar to {filepath} but not identical:

  • One that resolves to "DEST_PATH_ONLY" (no file name or extension)
  • One that resolves to "SOURCE_FILE_ONLY" (file name and extension of source file only).

Using these keywords, I could craft a button which would let me select the source files without having to also select the destination files to compare.

Are there any such keywords?

This will do it. You don't normally have to include quotes around the {} arguments but in this case they seem to prevent a quote appearing in the wrong place:

"C:\program files\WinMerge\WinMergeU.exe" "{filepath$}" "{destpath$}{file$}"

Perfect. Thanks, Leo.

Leo, what's the difference between "{filepath}" and "{filepath$}"?

One means the function "wants" the item and the other one means it "needs" the item.

Without the $ if you don't have a file selected the command will be run anyway, giving nothing in place of the {...}. The main use for that is to make a button which launches a program with the selected files, if any, or just launches the program otherwise.

With the $ if you don't have a file selected then the command won't run when you click the button. That usually makes sense when it's not right to run a program without specifying a file for it to work on.