No. I just want to compare the existence of the filenames without any additional parametersHacker wrote:Inka,
Shift-F2 doesn't help?
Roman
Compare Directory by File Name ONLY
Moderators: Hacker, petermad, Stefan2, white
Re: Compare Directory by File Name ONLY
It's 2019 already. Is there a way to compare 2 directories only by the file names with one hotkey?
Re: Compare Directory by File Name ONLY
Do you mean by only name and no extension?
If so, what about a situation like this:
What should be the outcome of a comparison on only "myfile" ?
If so, what about a situation like this:
Code: Select all
LEFT RIGHT
myfile.1 myfile.3
myfile.2 myfile.4
Re: Compare Directory by File Name ONLY
That is just extreme situation you are describing, and i get that its maybe not that uncommon, but same time in real most of the time filenames are unique or, at least in my case, i can recognize what i am seeing, and can deal with it adequately changing name or putting files in subdirs. I always struggle for example with trivial situation when i have to compare two dirs with pictures that one have original huge RAW or JPGs and second with converted to small "on screen only" version and in most cases i must do that manually one directory at a time...marlar wrote: 2019-08-28, 21:34 UTC If so, what about a situation like this:
Code: Select all
LEFT RIGHT myfile.1 myfile.3 myfile.2 myfile.4
It would be awesome to have another option in Synchronize Directories to ignore size and extension, because Shift+F2 in comparing dirs trees between RAW and small JPGs dirs just say:
Image: https://i.ibb.co/d7GfZJB/idntcl.png which is not true ofc

Re: Compare Directory by File Name ONLY
I know it is a special situation I sketch out, but still the algorithm would need to know how to handle such a case.
That aside, I appreciate your use case as I often come across it myself. I often set my DSLR camera up to record both a JPG and CR2 file. JPGs are easier to deal with, but then if I need it I also have the raw version. So I typically first go through the JPG folder and delete the files I don't need. And then I must delete the same files in the CR2 folder!
What I do is that I temporarily rename my CR2 files to JPG's and the do the dir sync. I reckon you do the same. But of course it would be easier if TC could do it for us!
And I have a proposal: TC could apply a set of rules and regex's for each dir, where each rule/regex would change the name internally while comparing. Much like the multi rename tool which I often use. So you could make a rule on each side that would ignore extensions. You could also apply a rule that compared only the first 6 characters of the file names etc.
The end result would be that TC would see the filenames after the rules were applied as if the files were originally called that.
Then what about the name clashes I pointed out? Here TC could use the same approach as the duplicate file finder. That is, group the same looking files together within some kind of breaker like dotted lines etc. Then it would be up to you to decide what to do in those cases.
A simpler approach, and arguable much easier to implement for Christian, would be to simply stop with an error: "Cannot compare dirs due to name clash" etc.
That aside, I appreciate your use case as I often come across it myself. I often set my DSLR camera up to record both a JPG and CR2 file. JPGs are easier to deal with, but then if I need it I also have the raw version. So I typically first go through the JPG folder and delete the files I don't need. And then I must delete the same files in the CR2 folder!
What I do is that I temporarily rename my CR2 files to JPG's and the do the dir sync. I reckon you do the same. But of course it would be easier if TC could do it for us!
And I have a proposal: TC could apply a set of rules and regex's for each dir, where each rule/regex would change the name internally while comparing. Much like the multi rename tool which I often use. So you could make a rule on each side that would ignore extensions. You could also apply a rule that compared only the first 6 characters of the file names etc.
The end result would be that TC would see the filenames after the rules were applied as if the files were originally called that.
Then what about the name clashes I pointed out? Here TC could use the same approach as the duplicate file finder. That is, group the same looking files together within some kind of breaker like dotted lines etc. Then it would be up to you to decide what to do in those cases.
A simpler approach, and arguable much easier to implement for Christian, would be to simply stop with an error: "Cannot compare dirs due to name clash" etc.
Re: Compare Directory by File Name ONLY
2marlar
Did you read the topic linked below?
https://www.ghisler.ch/board/viewtopic.php?f=3&t=53113
Maybe you should change your method…
Did you read the topic linked below?
https://www.ghisler.ch/board/viewtopic.php?f=3&t=53113
Maybe you should change your method…
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Compare Directory by File Name ONLY
Thanks Usher, I didn't know that feature! However, I usually keep my CR2 files in a sub folder called CR2 and the method you point our requires them to be in the same folder.
It is still very useful though
It is still very useful though

Re: Compare Directory by File Name ONLY
2marlar
Folder doesn't matter when you use Ctrl+B for flat view. Just test a little bit more…
Folder doesn't matter when you use Ctrl+B for flat view. Just test a little bit more…
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Compare Directory by File Name ONLY
2Usher
I just tried this. If I Use *.jpg>*.cr2 all jpg's are selected but none of the equivalent cr2's are selected. So it seems that the *.jpg>*.cr2 still only works for files in the same folder, also in Branch view.you use Ctrl+B for flat view
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Compare Directory by File Name ONLY
I can confirm petermad's observation. It does not work in flat view.
Re: Compare Directory by File Name ONLY
Hmm, I didn't test it, just guessed. I suspect that it won't work also for Alt+F7 list fed to listbox.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Compare Directory by File Name ONLY
2marlar
Put this command in your usercmd.ini file
it will make a file called .SELECTEDFILES.txt in the target folder, with all file names without extension (in Unicode).
Then make this button in the buttonbar:
1. Mark all files with same extension as file under cursor in current panel.
2. Make the .SELECTEDFILES.txt file in the target panel.
3. Clear the selection in the source panel.
4. Switch to the target panel.
5. Open a Windows dialog to choose the file .SELECTEDFILES.txt (just doubleclick the file, it should be in the top of the list) and mark the files listed in .SELECTEDFILES.txt.
6. Reverse the selection, which should be the files that does NOT have a matching filename in the opposite panel.
Now you can chevk if everything looks allright and press F8 to delete the selected files.
All together requires 3 mouse clicks - one on the button and a doubleclick on .SELECTEDFILES.txt in the Windows "Open" dialog
I can only think of this workaround:That aside, I appreciate your use case as I often come across it myself. I often set my DSLR camera up to record both a JPG and CR2 file. JPGs are easier to deal with, but then if I need it I also have the raw version. So I typically first go through the JPG folder and delete the files I don't need. And then I must delete the same files in the CR2 folder!
Put this command in your usercmd.ini file
Code: Select all
[em_copynamestofilewoext]
cmd=%COMSPEC% /C
param=if not exist "%P" (echo •) else (if exist "%T\.SELECTEDFILES.txt" del "%T\.SELECTEDFILES.txt") && for /F "usebackq delims=" %%n in (`type %WF`) do echo %%~nn.*>> "%T\.SELECTEDFILES.txt"
menu=Copy selected filenames without filetype to file in target folder
iconic=1
Then make this button in the buttonbar:
Code: Select all
TOTALCMD#BAR#DATA
cm_SelectCurrentExtension,em_copynamestofilewoext,cm_ClearAllFiles,cm_wait 500,cm_FocusTrg,cm_LoadSelectionFromFile,cm_ExchangeSelFiles
wcmicons.dll,40
Mark all fles in opposite panel that does not have a matching filename in the source panel
-1
it will:To make the button:
1. Mark the green text above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctri+C).
3. Right click on TC's buttonbar and choose "Paste".
1. Mark all files with same extension as file under cursor in current panel.
2. Make the .SELECTEDFILES.txt file in the target panel.
3. Clear the selection in the source panel.
4. Switch to the target panel.
5. Open a Windows dialog to choose the file .SELECTEDFILES.txt (just doubleclick the file, it should be in the top of the list) and mark the files listed in .SELECTEDFILES.txt.
6. Reverse the selection, which should be the files that does NOT have a matching filename in the opposite panel.
Now you can chevk if everything looks allright and press F8 to delete the selected files.
All together requires 3 mouse clicks - one on the button and a doubleclick on .SELECTEDFILES.txt in the Windows "Open" dialog
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Compare Directory by File Name ONLY
My wish:
MARK: "Compare names without file type (.ext)" or "Compare Directory by File Name ONLY"
In the window with the larger number of files, only select those files that also appear in the other window. Only the file name is compared. File type and content are not taken into account.
e:G.:
Left: a.jpg , b.jpg , e.jpg
Right: a,raw , b.raw , c.raw , d.raw , e.raw
only a.raw , b.raw and e.raw will be selectet.



e:G.:
Left: a.jpg , b.jpg , e.jpg
Right: a,raw , b.raw , c.raw , d.raw , e.raw
