Find same file name both sides
Moderators: Hacker, petermad, Stefan2, white
Find same file name both sides
Is there an easy way to find a file with the same name in the opposite window? Maybe the windows are sorted in different orders... Compare By Content finds the other file without it being selected, and shows the differences, but it doesn't leave the file selected, and gives me more information than I need. Any help appreciated...
If you're just trying to select the same files in both file lists this should work:
New button with command:
Your selection has to be in the left file list and your previous clipboard content will be overwritten.
@ghisler:
We still need a cm_SWITCH_FILELIST_AKA_[TAB]
*edit: Added "cm_FocusLeft" to make sure the left side is active
New button with command:
Code: Select all
cm_FocusLeft,cm_CopyNamesToClip,cm_FocusRight,cm_LoadSelectionFromClip
@ghisler:
We still need a cm_SWITCH_FILELIST_AKA_[TAB]
*edit: Added "cm_FocusLeft" to make sure the left side is active
Last edited by ZoSTeR on 2014-10-15, 19:31 UTC, edited 2 times in total.
-
- Senior Member
- Posts: 276
- Joined: 2011-11-15, 06:14 UTC
- Location: DE\BN - only part time TC user after switching to Linux ;)
I like your suggestion, thanks for this handy one!
I copied the commands you mentioned into a new button and soon realized it only works (as you mentioned, but i have not read in the first place
) one way but not the other...
some cm_command to do what the TAB button does, would be very nice for this to work both ways.
Yes. I strongly agree.ZoSTeR wrote:
@ghisler:
We still need a cm_SWITCH_FILELIST_AKA_[TAB]
I copied the commands you mentioned into a new button and soon realized it only works (as you mentioned, but i have not read in the first place

some cm_command to do what the TAB button does, would be very nice for this to work both ways.
em_SWITCH_FILELIST cm_tab // TC9: cm_FocusTrg
%Commander_Path%\usercmd.ini
Code: Select all
[em_SWITCH_FILELIST]
cmd=%Commander_Path%\TOOLs\NirSoft\nircmd.exe sendkey tab press
From Compare filenames without extension
EDIT:
cm_TAB a.k.a. cm_FocusTrg
HISTORY.TXT TC9.0 beta1 wrote:27.04.16 Added: New internal commands cm_FocusSrc and cm_FocusTrg
to put cursor in source/target panel (32/64)
Last edited by Stefan2 on 2016-06-10, 13:19 UTC, edited 1 time in total.
Using just TC (preserve clipboard contents, no focus switch):
Using TCFS2 (same thing but faster):
Jump to file in other panel and switch focus to it:
Here send({tab}) may be replaced with tcm(L_isActive ? 4002 : 4001) if TCFS2Tools is installed too.
Code: Select all
Command: %COMMANDER_EXE%
Parameters: /O /S /R="%T%N"
Code: Select all
Command: TCFS2.exe
Parameters: /ef "tcd(, `%T%O.%E`, s)"
Code: Select all
Command: TCFS2.exe
Parameters: /ef "tcd(, `%T%O.%E`, s) send({tab})"
You could add "cm_GotoNextSelected" or "cm_ShowOnlySelected"
cm_GotoNextSelected doesn't neccessarly jump to the first selected file.
The summary below the file list also shows the number of selected files.
For the "ShowOnlySelected" variant you have to restore the view after the first use with "cm_RightAllFiles":
cm_GotoNextSelected doesn't neccessarly jump to the first selected file.
The summary below the file list also shows the number of selected files.
For the "ShowOnlySelected" variant you have to restore the view after the first use with "cm_RightAllFiles":
Code: Select all
cm_FocusLeft,cm_CopyNamesToClip,cm_FocusRight,cm_RightAllFiles,cm_LoadSelectionFromClip,cm_ShowOnlySelected
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
So, why this (button) is not working?Stefan2 wrote:
%Commander_Path%\usercmd.ini
Code: Select all
[em_SWITCH_FILELIST] cmd=%Commander_Path%\TOOLs\NirSoft\nircmd.exe sendkey tab press
Code: Select all
cm_CopyNamesToClip,em_SwitchFilelist,cm_LoadSelectionFromClip
2. Nircmd switch focus to other panel - OK.
3. Nothing happens with file(s) with same name and extension - ?
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
Yes, sorry. In the meantime I can imagine why it not works:mrle wrote:So, why this (button) is not working?Stefan2 wrote:
%Commander_Path%\usercmd.ini
Code: Select all
[em_SWITCH_FILELIST] cmd=%Commander_Path%\TOOLs\NirSoft\nircmd.exe sendkey tab press
because all commands are fired up (nearly) the same time after button press and do not work one after the other, as far as I see. I think we need a 'wait' command here too.
- - -
You can try to use nircmd in a batch file
as we have done in the linked post
and use that in your button.
There you can add commands to do a pause, like ping or timeout.
Something like:
Code: Select all
@ECHO OFF
SET nirc=%Commander_Path%\TOOLs\NirSoft\nircmdc.exe
REM cm_CopyNamesToClip
%nirc% win sendmsg class TTOTAL_CMD 1075, 2017, 0
REM wait 2 seconds:
PING -n 2 127.0.0.1 >NUL
REM em_SwitchFilelist
%nirc% sendkey tab press
REM cm_LoadSelectionFromClip
%nirc% win sendmsg class TTOTAL_CMD 1075, 2033, 0
---- EDIT
Improved script:
Code: Select all
@ECHO OFF
SET nirc=%Commander_Path%\TOOLs\NirSoft\nircmdc.exe
REM be sure to work on the TC window
%nirc% win activate class TTOTAL_CMD
REM I don't know why the windows is resized, so this is need too:
%nirc% win max class TTOTAL_CMD
REM cm_CopyNamesToClip
%nirc% win sendmsg class TTOTAL_CMD 1075, 2017, 0
REM wait 1 second:
%nirc% wait 1000
REM em_SwitchFilelist
%nirc% sendkey tab press
REM cm_LoadSelectionFromClip
%nirc% win sendmsg class TTOTAL_CMD 1075, 2033, 0
Last edited by Stefan2 on 2014-11-10, 15:29 UTC, edited 1 time in total.
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
Yes, almost certainly.Stefan2 wrote:because all commands are fired up (nearly) the same time after button press
Problem with bat is that cmd.exe takes focus (while pinging localhost), so nircmd is sending "tab press" to its window.
... But never mind, it's not matter to me. Please don't waste your time.
Thanks.
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
Right. I had missed some parts to copy from the linked script, and I worked to quick&dirty, sorry.mrle wrote:Stefan2 wrote:Problem with bat is that cmd.exe takes focus
I have now updated my script above, just for the record. (It still have some problems)
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
Stefan2 wrote:Something like:
This command works w/o mentioned problems (doesn't change window size, doesn't eat focus when started from buttonbar or via hotkey):Stefan2 wrote:Improved script:
Code: Select all
TCFS2 /ef "tcm(2017) delay(2000) send(`{tab}`) tcm(2033)"
Re: em_SWITCH_FILELIST cm_tab cm_SWITCH_FILELIST
Sure, stay coolMVV wrote: Much better commands were written by me above.


But
Code: Select all
TCFS2 /ef "tcm(2017) delay(2000) send(`{tab}`) tcm(2033)"