Page 1 of 1

Sync folders functionality

Posted: 20 Jun 2019 20:26
by Bee
Hello everyone,

I love the sync folders function and use it a lot. Is it possible to predefine specific locations for source and target and how they should be synced and get the sync folders process going with just one button regardless of what folders are displayed in the panes? As far as I understand it, right now the source folder has to be the one that is displayed in the active pane while the target has to be the one displayed in the second pane, right?

I hope I've worded what I mean in an understandable way. Thanks in advance.

Re: Sync folders functionality

Posted: 21 Jun 2019 23:07
by jupe
Yes you can setup custom jobs etc via simple scripting, you can paste the following into the XY address bar for more information if you are interested:

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_sync";
The scripting commands can be run from custom toolbar buttons, UDC, Catalog, address bar etc.

Re: Sync folders functionality

Posted: 22 Jun 2019 11:04
by Bee
Thank you. I thought it was probably possible with scripting but had hoped for something easier.

Re: Sync folders functionality

Posted: 22 Jun 2019 11:17
by jupe
Easier ? If you bother to look in the help file at the examples shown, they are all one line, basically sync "path1", "path2"; at a minimum, so not sure how it could be any easier.

Re: Sync folders functionality

Posted: 22 Jun 2019 11:59
by Bee
Sorry if I came off as unappreciative, I've just never worked with the scripting function before. Thanks again for your help.

Re: Sync folders functionality

Posted: 22 Jun 2019 17:25
by admin
Just to give you a real-world example, this is a script I use all the time to backup my source code to some stick. It's not really a sync job since it goes to a dated folder, so every day a fresh backup is created in a new place. BTW, "-appdata\" is used to exclude the appdata folder:

Code: Select all

sync "E:\XY\XYplorer.dev\code\", "I:\bup.snap\XY-code-<date yyyy>\<date yyyymmdd> (<xyver>)\", 1, 0, 0, "ckn", 7:="-appdata\";
More info you find in the help under the sync scripting command.

The script (as "Location" which is auto-recognized as script) is wrapped in a Catalog item so it's just one click to trigger it:
2019-06-22_172638.png
In the Catalog it looks like this:
2019-06-22_172928.png

Re: Sync folders functionality

Posted: 24 Jun 2019 14:43
by Bee
Thank you, that was helpful!