Page 1 of 1

Syncronize selected files (separate instance)

Posted: 2016-07-26, 12:05 UTC
by LonerD
Total Commander have command cm_FileSync for compare directories in left and right panels (if no selection) or selected files/directories (if present selection).
It would be great to have the same command for compare in separate process cm_FileSyncSeparate .

Now I use command

Code: Select all

[em_FileSync]
cmd=%commander_exe% /S=S:=
param=%X%Z "%P" "%T"
But it compare only full directories in left and right panels, not selected files.

Posted: 2016-07-26, 13:20 UTC
by Horst.Epp
Found in the forum :D

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%C1 %C2
wcmicons.dll,48
Synchronize first two marked folder (separate Instance)

0
-1

Posted: 2016-07-26, 17:30 UTC
by LonerD
2Horst.Epp
Thanks, but not. Your solution is not the same as cm_FileSync.

cm_FileSync works with selected files and directories in left and right panels, and now it's no possibility to make the same in separate process.

Posted: 2016-07-26, 18:10 UTC
by Horst.Epp
LonerD wrote:2Horst.Epp
Thanks, but not. Your solution is not the same as cm_FileSync.

cm_FileSync works with selected files and directories in left and right panels, and now it's no possibility to make the same in separate process.
Thats what the button does !
It runs definitely as a seperate process, read the help if you don't know.
Also you can select two folders or archives on whatever side you like.

Posted: 2016-07-26, 19:41 UTC
by Dalai
2Horst.Epp
No, it doesn't. LonerD wants to select some files and/or directories and compare/synchronize only those, nothing else. Imagine 50 files are marked and cm_FileSync is executed -> TC checks the option "Only selected". That works in the current instance. The suggestion is to do this in a separate TC instance.

Your suggestion launches the sync feature of the two marked directories in a separate instance and compares ALL files in these directories.

Regards
Dalai

Posted: 2016-07-26, 19:57 UTC
by Horst.Epp
Dalai wrote:2Horst.Epp
No, it doesn't. LonerD wants to select some files and/or directories and compare/synchronize only those, nothing else. Imagine 50 files are marked and cm_FileSync is executed -> TC checks the option "Only selected". That works in the current instance. The suggestion is to do this in a separate TC instance.

Your suggestion launches the sync feature of the two marked directories in a separate instance and compares ALL files in these directories.

Regards
Dalai
Not completely agree. He said:
"cm_FileSync for compare directories in left and right panels (if no selection) or selected files/directories (if present selection). "
So there was no request to do this only for selected files or dirs.

Posted: 2016-07-26, 23:44 UTC
by petermad
2LonerD

You need this:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%Z%X "%P" "%T" /O=%L
wcmicons.dll,48
Syncronize Directories (separate instance), only selected


-1
Notice you cannot use this with non selected dirs/files - the dir/file under the cursor will always be selected even if it is not marked as such.

corresponding em_command:

Code: Select all

[em_sync2]
cmd=%COMMANDER_EXE% /S=S
param=%Z%X "%P" "%T" /O=%L
menu=Syncronize Directories (separate instance), only selected
button=wcmicons.dll,48

Posted: 2016-07-28, 13:21 UTC
by LonerD
petermad wrote: You need this:
No. It's not the same as cm_FileSync.

Just compare.
I open two directories, select some files and directories on both panels, and then press cm_FileSync.
Result:
http://i.imgur.com/NGRE4Nk.png

Then I press your button (with the same selection).
Result is different
http://i.imgur.com/23Oy23O.png

Posted: 2016-07-28, 13:57 UTC
by Dalai
2LonerD
Well, it looks like TC passes only one list to the sync instance, which is quite logical because %L is replaced by a file containing the list of all selected files in the active panel (left or right). In other words: Peter's solution works if you select files in one panel only.

Regards
Dalai

Posted: 2016-07-28, 19:36 UTC
by petermad
No. It's not the same as cm_FileSync.
You are right - unfortunately it is currently not possible to pass a list of selected files from both sides to the separate instance.

Maybe something for a feature request to Ghisler...

Posted: 2016-08-03, 19:33 UTC
by paravion
Thumbs up for this useful feature!

Re: Syncronize selected files (separate instance)

Posted: 2021-03-14, 00:21 UTC
by LonerD
Hope it will be implemented in TC 10.
We have different separate instance commands, but still not for comparing selected files.