Sync folders functionality

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Bee
Posts: 53
Joined: 05 Apr 2017 19:19

Sync folders functionality

Post 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.

jupe
Posts: 2790
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Sync folders functionality

Post 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.

Bee
Posts: 53
Joined: 05 Apr 2017 19:19

Re: Sync folders functionality

Post by Bee »

Thank you. I thought it was probably possible with scripting but had hoped for something easier.

jupe
Posts: 2790
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Sync folders functionality

Post 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.

Bee
Posts: 53
Joined: 05 Apr 2017 19:19

Re: Sync folders functionality

Post by Bee »

Sorry if I came off as unappreciative, I've just never worked with the scripting function before. Thanks again for your help.

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Sync folders functionality

Post 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
2019-06-22_172638.png (11.53 KiB) Viewed 1730 times
In the Catalog it looks like this:
2019-06-22_172928.png
2019-06-22_172928.png (1.62 KiB) Viewed 1729 times

Bee
Posts: 53
Joined: 05 Apr 2017 19:19

Re: Sync folders functionality

Post by Bee »

Thank you, that was helpful!

Post Reply