Compare files from 'Confirm File Replace' dialog?

Would it be possible to provide a compare file functionality that could be launched when Directory Opus displays a pop-up asking for confirmation to replace a file. Would be nice if this compare program could be configurable to use other 3rd party programs like Beyond Compare.

1 Like

You can do this already, although it's a somewhat hidden feature:

Settings > File Types, then as in the screenshot below:

Use the diff/comparison tool(s) of your choice. You can set up multiple items if you want the choice of different tools for different situations.

2 Likes

As you say, a somewhat hidden feature but a very useful one now that it's no longer hidden! In all my years of using Directory Opus I never knew that you could right click on the Existing or New file icon to pop up a context menu. :grinning: :+1:

1 Like

Thanks for responding and glad there is a work-around. However, still believe that a UI improvement to add this 'Compare' button would be beneficial to all users.

1 Like

I agree UI improvement is needed here, these days UI should facilitate feature discovery, otherwise all the effort of feature implementation is in vain if users don't even know it's there :slight_smile:

I know it's a small convenience feature added at one point "if you need it it's there", but over time these tend to accumulate so UI needs to adapt to accomodate them (hint for Opus 13 :smiley: ).

I think Beyond Compare is not free -- are there any applications that are particularly suitable for this feature that are freeware? Thanks.

Several. Try WinMerge.

1 Like

Hello! o)

Any chance these custom "ReplaceMenu" entries could be made visible more clearly? In a separate menu button in the replace dialog maybe? When using the right click on the thumb, there is a lot of stuff you are not looking for when trying to find your custom replace action (or if there is any at all).

I also would not expect it to be in the context menu of both of the files in question. We have a user in the german forum asking if he could integrate his custom replace functionality for a "replace" situation when copying / moving images (he wants to open the two images "bigger" to make comparing more easy). We all were of the opinion it is not possible.. then I searched, since I wasn't so 100% sure and found this. o)

Additionally I found a custom replace action in my own configuration, I seem to have fiddled with it in the past, but nobody seems to remember! It's a top feature, it needs more surface to jump in everybody's face and stay there. o)

Thank you! o)

You can double-click the thumbnails to open the files, in addition to the things the right-click menu can do.

Yes, no! o)

I tried, yes.. opening each file separately with a double click is nice (and surely also useful in many case), but it's not what you want if you try to run an external compare tool for the images e.g.. I know, you can do via the menu, but as said.. it's really not obvious and if you have a lot of "replace" cases, it probably is a bit annoying to always launch the compare via the menu (aim thumbnail, right click, aim, left click etc.).

I know we are talking "deluxe" mode here, no question.. I think something like this would work nicely and easily jump in your face and is accessible with a single click for the default custom replace action.

If the external tool or internal script or whatever is triggered would return a value, which DO would automatically use to actually replace or skip the file and move on, without the need to close the external compare "thing" and then having to click again on one of the standard buttons of the replace dialog, I think that would be awesome too. o))

Ah, man.. we are so spoilt.. o)

image

I guess I was thinking on how kdiff3 or p4merge work in conjunction with git. If you have a merge conflict in git, it can open the external compare/diff tool and depending on what you do in the tool, once you exit it, the conflict is solved for git and the next conflict comes up.

This is optional of course, you can also just leave the tool, leave the conflict untouched (and just use the DO "Replace" button to move on).

i only learnt about this compare with right click from last week while watching an only highlights from v10 videos on youtube.

Playing some more with the "Replace Menu" thing, I noticed that the source and destination arguments are swapped.

This is the commandline DO "generated":
"BCompare.exe" "\10.22.0.1.." "D:\tmp.." /filters="folder.jpg" /solo

The "\10.22..." UNC path is first and opens left in BeyondCompare.
The "D:" path is local and will open right in BeyondCompare.

Aehm, wait!.. o)
I was about to open a dedicated bug thread, but I just realized, that when I use the context menu on the existing file thumbnail (the "existing" upper one in the replace dialog) the paths are passed as shown above (unexpected), while if using the context menu on the lower thumbnail (the new file), the paths are passed in the "expected" order, matching source and destination from my "Copy" operation.

image

I kind of get why that is, but this seems hard to use and remember. Maybe a dedicated "Compare Menu" button really makes sense, which only makes use of the expected source / destination paths?!..

My "workaround".. mhh. o)

image

Probably useful for all BeyondCompare users, here is an enhanced command to run BeyondCompare in the "All Files -> Replace Menu" file types section:

Instead of directly passing the source/target full paths to the files (which only allows viewing of the two files), this commands uses the parent folder paths and sets the actual file (name) to compare via the filters switch of BeyondCompare.

@nofilenamequoting 
<fill in here>\BeyondCompare_v3.3\BCompare.exe"  "{sourcepath$}" "{destpath$}" /filters="{file$}" /solo /expandall

This way BeyondCompare opens in "folder compare" mode, which gives you options to handle the existing file conflict (move to right, delete etc..) directly in BC:

When double clicking the conflicting file in the BeyondCompare "folder compare" view, you still get the compare view for both files, but also additional options to handle the conflicting file.

So you basically resolve the conflict in BeyondCompare instead of DO and its replace dialog, you can just use "Skip" in there.

@tbone there a button in your context menu... "OCR to *.txt" ... is that custom? or coming from a piece of software? if so which one?

I bet a lot of folks would be thrilled about a new script event, like OnConfirmReplace. It'd let you swap out the default replacement dialog, so you can make it look just the way you want and add a bunch of cool extra functions to it.

@xavierarmand
It's some old entry, not sure when I used it the last time, it run Tesseract OCR and reads text from an image to *.txt file. Results are very mixed and not good for text on screenshots e.g., I guess I used it to pull text from scanned PDFs back then, when I digitized all the paperwork I had. This is the command, including an unresolved irritating behaviour or bug. o)

Mhh, I'm not so sure. o) I would not like to mess unnecessarily with any copy / move operation DO is doing. DO does a lot of things when copying files. Handling ADS, ACL, server side copy, restoring date stamps, unattended mode, queuing, progress dialog etc.. The options presented already like "Skip all / identical", "Replace ..", "Rename old / new" etc. are also not easy to replicate.

So, I would think extending the existing concepts and dialog(s) probably makes more sense, than trying to reinvent any wheel (which then is not feature complete either).

That said, there is surely potential to get an even more sophisticated handling, but any enhancement needs much thinking beforehand.. doing a consistent copy / move sounds easy, but is tricky in the details, especially if you want to integrate it into a greater concept (handling additional parameters, taking into account default settings, keyboard shortcuts etc.).

1 Like

thanks for the info. i went looking on the forums and also found this from last summer. wasn't able, yet, to get it work. this could be a great context menu\button if i can get it work.

Maybe check current technology first.. I wasn't ever satisfied with tesseracts OCR output, Win10 has some OCR stuff built in, maybe there are better ways to do this in 2024, not sure. o) Seeing computers understand human voice and even responding, it's kind of weird there are problems reading simple text? o)

1 Like