Syncronize selected files (separate instance)

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Syncronize selected files (separate instance)

Post 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.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6507
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post 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
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post 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.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6507
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9402
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post 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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6507
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post 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.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.77
QAP 11.6.3.3 x64
User avatar
petermad
Power Member
Power Member
Posts: 14823
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post 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
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
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post 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
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Dalai
Power Member
Power Member
Posts: 9402
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post 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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14823
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post 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...
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
paravion
Junior Member
Junior Member
Posts: 28
Joined: 2016-06-23, 20:43 UTC

Post by *paravion »

Thumbs up for this useful feature!
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Re: Syncronize selected files (separate instance)

Post by *LonerD »

Hope it will be implemented in TC 10.
We have different separate instance commands, but still not for comparing selected files.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Post Reply