Separate Synchronize Dirs pane with archive

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Separate Synchronize Dirs pane with archive

Post by *Guillaume »

I want to be able to use the TC instance after I have opened a Synchronize Directories pane, including the possibility to use "Only selected" in the separate pane, so I'm using

Code: Select all

%commander_exe% /n /o=%F /s=s %X "%P" "%T"
for that.

This does not work, however, when one of the TC panels shows the contents of an archive. In that case, a new instance of TC is opened instead of the Synchronize Directories pane.

Is there a way to make this work, or (in which case I totally missed it when searching) is there simply a wincmd.ini parameter to always open Synchronize Directories panes as a separate process (via the internal command cm_FileSync)?
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Separate Synchronize Dirs pane with archive

Post by *Dalai »

Does it work when you add %Z to the parameters?

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: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Separate Synchronize Dirs pane with archive

Post by *petermad »

You cannot use %,F %X, %P and %T in the cmd field, they have to be in the param field:

These ones works for me - also in archives - em_ext_sync2 is closest to yours:

Code: Select all

[em_ext_sync]
cmd=%COMMANDER_EXE% /S=S
param=%Z%X "%P" "%T"
menu=Synchronize Directories (separate instance)
button=wcmicons.dll,48

Code: Select all

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

Code: Select all

[em_ext_sync3]
cmd=%COMMANDER_EXE% /S=S
param=%Z %C1 %C2
menu=Synchronize first two marked folders/archives (separate instance)
button=wcmicons.dll,48

Code: Select all

[em_ext_sync4]
cmd=%COMMANDER_EXE% /S=S:=
param=%Z%X "%P" "%T"
menu=Syncronize Directories - autostart with current settings (separate instance)
button=%COMMANDER_EXE%,32

Code: Select all

[em_ext_sync5]
cmd=%COMMANDER_EXE% /S=S:=<default>
param=%Z%X "%P" "%T"
menu=Synchronize Directories - autostart with default settings (separate instance)
button=%COMMANDER_EXE%,32
------------------------------

Or as Buttons:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%Z%X "%P" "%T"
%COMMANDER_EXE%,32
Synchronize Directories (separate instance)


-1

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%Z%X "%P" "%T" /O=%L
%COMMANDER_EXE%,32
Synchronize Directories, only selected (separate instance)


-1

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%Z %C1 %C2
%COMMANDER_EXE%,32
Synchronize first two marked folders/archives (separate instance)


-1

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S:=
%Z%X "%P" "%T"
%COMMANDER_EXE%,32
Synchronize Directories - autostart with current settings (separate instance)


-1

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S:=<default>
%Z%X "%P" "%T"
%COMMANDER_EXE%,32
Synchronize Directories - autostart with default settings (separate instance)


-1
To make the button:
1. Mark the green text above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctri+C).
3. Right click on TC's buttonbar and choose "Paste".
Last edited by petermad on 2019-11-01, 21:10 UTC, edited 1 time in total.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Separate Synchronize Dirs pane with archive

Post by *Guillaume »

petermad wrote: 2019-11-01, 16:34 UTC You cannot use %,F %X, %P and %T in the cmd field, they have to be in the param field.
I should have been more clear about my setup, yeah. Those params were in the correct field.

Adding %Z did work indeed, thanks @petermad and @Dalai. However, I found this command to be diverging too much from the regular cm_FileSync to be useful to me:
1. Does not work at all when no files have been selected (cursor is at "..")
2. /O=%L also sees the cursor as a selection, but I want the same behavior as cm_FileSync, where only actually selected files count for "Only selected".
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Separate Synchronize Dirs pane with archive

Post by *Dalai »

Well, you could use it the other way around: launch a new TC instance and call the Synchronize directories function in the first/previous instance.

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: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Separate Synchronize Dirs pane with archive

Post by *petermad »

2Guillaume
/O=%L also sees the cursor as a selection
That can be avoided with the %Y parameter:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S
%Z%X%Y "%P" "%T" /O=%L
%COMMANDER_EXE%,32
Synchronize Directories, only selected (separate instance)


-1
But you have to remove the checkmark in "Only selected" yourself.
Last edited by petermad on 2019-11-01, 21:10 UTC, edited 1 time in total.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Separate Synchronize Dirs pane with archive

Post by *petermad »

You can also do a test whether anything is selected and do a conditional start of the sync tool depending on that:

Code: Select all

TOTALCMD#BAR#DATA
%COMSPEC% /C
if '%Y%S1'=='' (start "" "%%COMMANDER_EXE%%" /S=S %Z%X "%P" "%T") else start "" "%%COMMANDER_EXE%%" /S=S %Z%X "%P" "%T" /O=%L
%COMMANDER_EXE%,32
Synchronize Directories (separate instance)


-1
I think this solution could satisfy you.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Re: Separate Synchronize Dirs pane with archive

Post by *Guillaume »

2petermad This works perfectly, thank you so much! :)
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Separate Synchronize Dirs pane with archive

Post by *HerbieH »

To petermad

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S:=
%Z%X "%P" "%T"
%COMMANDER_EXE%,32
Synchronize Directories - autostart with current settings (separate instance)
Can you make the above work, if the target directory is a connection from the list of ftp connections?


In Total Commander target pane it just says:

Code: Select all

0:/folder_path_on_the_ftp_server
But in my saved wincmd.ini [SyncOptions] the target path is written as:

Code: Select all

R=ftp:name of the ftp_connection |:/folder_path_on_the_ftp_server

PS: Thank you for your good answers on this forum. You are the greatest.
HerbieH*
-Keep on makin' music!
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Separate Synchronize Dirs pane with archive

Post by *petermad »

2HerbieH
Can you make the above work, of the target directory is a connection from the list of ftp connections?
Sorry - I cannot do that because if the way TC returns the value og %T for an FTP connection.

You can save the Sync with for example the name FTP and then load it and automatically start it with this button:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE% /S=S:=FTP

%COMMANDER_EXE%,32
Synchronize Directories - autostart with saved setting: FTP


-1
You will be promted for the password to the FTP site.


You can use this button - which will prompt you for the name of the saved Sync - not separate instance:

Code: Select all

TOTALCMD#BAR#DATA
SYNCOPEN=
FTP
%COMMANDER_EXE%,32
Synchronize Directories - autostart with saved setting - suggesting FTP


-1

Or this button if you want a separate instance with a prompt - make sure not to delete /S=S:= if you change the setting name

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_EXE%
? /S=S:=FTP
%COMMANDER_EXE%,32
Synchronize Directories - autostart with saved setting: FTP (separate instance)


-1
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Separate Synchronize Dirs pane with archive

Post by *HerbieH »

To petermad

Hi.
Thank you for your answer. :)

You wrote:
Sorry - I cannot do that because if the way TC returns the value of %T for an FTP connection.
Well.. Thats a shame. It would have given me a bit more flexibilty in my server work.

My goal is still make different types of server synchronization in the background - without typing.
So for now I'll just have to settle with some more 'preset' savings in 'Synchronize directories'. (A nice feature btw.)

PS: I have not given up, and will be fiddling with your other suggestions.. :wink:
HerbieH*
-Keep on makin' music!
Post Reply