Navigation:  Contents > Introduction > A new task: Advanced >

Custom steps

Print this Topic Previous pageReturn to chapter overviewNext page

Easy2Sync can in certain situations before or after the sync execute custom steps. Each line is one step that is executed as Windows command (similar to a batch file).


You can use the place holder %1 (and for some situations %1 and %2) for the path (the paths) of the situation. If you want to simulate keyboard input for the run program (e.g. for "Are you sure (y/n)" confirmations), you can do this by appending "<<Text".


The following situations can trigger the execution of custom steps:

Before checking the folders
After creating a base folder
(Only when one of the base folders was created. Won't be called for normal subdirectories.)
Before the sync
After a successful sync
(Is run after the sync was completely run, no matter if all objects were copied successfully.)
After each sync
(Is always run, even if the sync was canceled.)


Example 1:

A base directory created by Easy2Sync has to receive certain user rights:

After creating a base folder:

cacls "%1" /P "computer\user1:F" <<Y

cacls "%1" /E /P "computer\user2:F"

(Since the first cacls call will ask for configuration, this automatically answered with <<Y.)


Example 2:

A TrueCrypt has to be mounted before the sync and unmounted afterwards.

Before checking the folders:

C:\programme\truecrypt\truecrypt /v c:\mycontainer /lx


After each sync:

C:\programme\truecrypt\truecrypt /d


Example 3:

A program has to be started without Easy2Sync waiting for it to end:

Start "[NAME]" /B /D "[ProgramPath]" [Program] [ProgramParameter]


Synchronize files