Simpler invocation of cm_FileSync for archive contents
Moderators: white, Hacker, petermad, Stefan2
Simpler invocation of cm_FileSync for archive contents
Here is s small wish which shouldn't be too difficult to add. I often have the situation that I want to compare the contents of archives (which are in the same folder most of the time). The command to use is synchronize dirs. AFAIK the only way to do it is:
1. Open the folder on both sides.
2. Open archive 1 left
3. Open archive 2 right
4. cm_FileSync
What I wanna do is
1. Select both files (on one side or not)
2. cm_FileSync (or maybe a new command)
What do you think?
1. Open the folder on both sides.
2. Open archive 1 left
3. Open archive 2 right
4. cm_FileSync
What I wanna do is
1. Select both files (on one side or not)
2. cm_FileSync (or maybe a new command)
What do you think?
Re: Simpler invocation of cm_FileSync for archive contents
One way to do it:Lefteous wrote:AFAIK the only way to do it is:
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE%
/S=S %P%S
wcmicons.dll,48
Synchronize first two marked folder (separate Instance)
%COMMANDER_PATH%
-1
Holger
Re: Simpler invocation of cm_FileSync for archive contents
How to make it works, if first archive is on left and second on right panel?
I tested, unsuccessfully (it broke the original functionality when both selected archives are on one side), these parameters:
/S=S:= %P%S %T%R
I tested, unsuccessfully (it broke the original functionality when both selected archives are on one side), these parameters:
/S=S:= %P%S %T%R
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
1. format C:
2. install TotalCmd
3. install Windows (optionally)
S: and S:= are meant for the alternate setting files.accepts two paths as parameters, or alternatively a settings name in the form /S=S:SettingsName
%P%S is the list of all selected files in the source panel
%T%R is the list of all selected files in the target panel
If you want to compare the archive under the cursor with the corresponding archive in the opposite panel, you should try:
/S=S %P%N %T%N
(mention that between "/S=S" and "%P%N %T%N" is only a space character)
If these files have different names but in each panel ís only one file selected:
/S=S %P%S %T%R
If more than one file per panel is selected:
/S=S %P%S1 %T%R1
S1 limits the list to the first selected file in source panel.
R1 does the same for the target panel (also it's not explicit listed in Help).
Regards
Holger
Edit:
/S=S:= %P%S1 %T%R1 should work as well with the last used Settings
Thank you HolgerK for your advices!
Is there a way how to cover both possibilities by one button, namely that in one case are compared archives in the same panel and in another case is one archive on the left and the second archive on the right panel?
Is there a way how to cover both possibilities by one button, namely that in one case are compared archives in the same panel and in another case is one archive on the left and the second archive on the right panel?
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
1. format C:
2. install TotalCmd
3. install Windows (optionally)
How about this solution_
It will act the same way as Compare by Content. It will sync the first two folders/arhives it sees. If two folders are marked in the active side then these two folders wil be sync'ed (no matter wat is selected or not in the other panel). If one folder is selected in the active panel it will be sync'ed with the first selected folder in the other panel.
If nothing is selected in either panel, Then TC will try to compare the folder under the cursor with a folder with the same name in the opposite panel - NOTE there is no check of whether there actually existst such a folder in the inactive panel - you'll find out when you start the sync - "Left/Right path invalid" message.
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%C1 %C2
wcmicons.dll,48
Synchronize first two marked folder (separate Instance)
-1
If nothing is selected in either panel, Then TC will try to compare the folder under the cursor with a folder with the same name in the opposite panel - NOTE there is no check of whether there actually existst such a folder in the inactive panel - you'll find out when you start the sync - "Left/Right path invalid" message.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Thank you petermad!
Your solution works for most situation flawlessly, except if you want compare two disks (e.g. work disk and backup disk). An little unclean workaround is to show parent dir [..] in root of drive and place the cursor on it in active panel. Do you (or anybody else ofcourse) have any idea, how to solve this litle glitch?
Your solution works for most situation flawlessly, except if you want compare two disks (e.g. work disk and backup disk). An little unclean workaround is to show parent dir [..] in root of drive and place the cursor on it in active panel. Do you (or anybody else ofcourse) have any idea, how to solve this litle glitch?
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
1. format C:
2. install TotalCmd
3. install Windows (optionally)
2Damel
Try
HTH
Regards
Dalai
Try
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%P %T
wcmicons.dll,48
Synchronize current folders (separate instance)
-1
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Then you just use the normal Synchronize Dirs option in the menu...except if you want compare two disks
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
To Dalai: This does not work as expected in connection with the previous requirements (among others comparing the contents of selected archives). But even so, thank you for your effort!
To petermad: I was afraid you'd say that. However, now I will use your code as a user command assigned to the keyboard shortcut (CS+D), which I had with cm_FileSync. So many thanks again!
To petermad: I was afraid you'd say that. However, now I will use your code as a user command assigned to the keyboard shortcut (CS+D), which I had with cm_FileSync. So many thanks again!
Code: Select all
[em_FileSync]
button=wcmicons.dll,48
cmd=%COMMANDER_EXE%
param=/S=S %C1 %C2
menu=Synchronize first two marked folders/archives (separate Instance)
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
1. format C:
2. install TotalCmd
3. install Windows (optionally)