Call saved duplicates search from user command

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
FitzWM
Junior Member
Junior Member
Posts: 6
Joined: 2018-01-30, 16:03 UTC

Call saved duplicates search from user command

Post by *FitzWM »

Hi, all,

I recently discovered TC's lovely "find duplicates" feature, and while it's great, it would be even greater if I could call it from a hotkey. Ideally, I would be able to have TC do this:
  1. Enter branch mode
  2. Find duplicates in the current pane
  3. Select (or maybe mark is the right jargon?) those duplicates
  4. Hide all other files in the pane
  5. Unselect the duplicates so I can look them over individually
I already have a functional saved search, fdupes, with these parameters: "*.*" in ".", 2x

When I run the above search from the search window, it works as expected, though it's obviously confined to the search window, rather than the lister. I've also tried to use it via the cm_selectFiles command, though it appears that command doesn't support the duplicates option. I've found older posts that seem to reference a SELECTFILES command to call saved searches, but that doesn't seem to exist anymore. Or perhaps it simply doesn't support duplicates, either? I've also messed around with variations of the cm_selectFiles, cm_selectBoth, cm_searchFor, cm_ShowOnlySelected, and other commands, to no avail.

Is there a way to do what I'm trying to do? I would also settle for a way to automatically load and run the above search, if that's all TC will allow at the moment. I've seen threads referencing a LOADSEARCH command, but it's not working for me any more than SELECTFILES. Apologies if I'm missing something obvious. It feels like I am.

TC version: 10.00RC1
OS version: Windows 10 Pro 20H2
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Call saved duplicates search from user command

Post by *petermad »

I already have a functional saved search, fdupes, with these parameters: "*.*" in ".", 2x
I doubt that you will find anything with that parameter for a saved search - the in "." part would mean to only search in directories with no name and extension = no result!

The parameter:

Code: Select all

"*.*", 2x
should work though (blank "Search in" field).

1. You don't have to enter branch mode first - search will by default search in all subdirectories anyway.
2 - 5. After doing the search - You can just click the "Feed to listbox" button - then you will have all your duplicates listed in groups.

you can make a user command (em_command) in your usercmd.ini file like this:

Code: Select all

[em_searchfordupes]
cmd=LOADSEARCH==fdupes
and then assign a hotkey to the em_searchfordupes command or use it in a button - it will load the saved fdupes search, perform the search AND feed it to listbox.
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
Post Reply