Synchronize Folders Action Icon

Synchronize Folders Action

Declaration

<AMSYNCFOLDERS FOLDER1="text" FOLDER2="text" INCLUDE="text" EXCLUDE="text" METHOD="text [options]" EXACTCOPY="yes/no" SUBFOLDERS="yes/no">

See Also

Copy File, Move File, Delete File, Delete Folder, Rename Folder

Description

Synchronizes two folders either uni-directionally (one-way) or bi-directionally (both ways).

Practical Usage

Usually used replicate folders between a machine and the local network or to backup a folder.

Parameters

General Tab

Folder 1
Text, Required
MARKUP: FOLDER1="c:\firstfoldername\"

Specifies a folder that should be synchronized. If Method [METHOD] is set 'UNI' to then files from this folder that do not exist or are newer than their counterparts in folder2 [FOLDER2] will be tranferred to the folder specified in the Folder2 [FOLDER2] parameter. If Method [METHOD] is set to 'BI' then files from folder 2 that are newer or do not exist will be transferred into this folder as well.

Folder 2
Text, Required
MARKUP: FOLDER2="c:\otherfoldername\"

Specifies the file(s) to that should be affected by the attribute change. This can be a fully qualified path and filename (preferred) or a single file (requires use of the Change Folder action). Wildcards ( e.g. *.* or ? ) may be used to rename files matching a certain mask. Multiple file and/or file masks may be specified by separating the entries with the | symbol.

Include Mask(s)
Text, Optional - Default "*.*"
MARKUP: INCLUDE="*.txt"

Specifies a wildcard mask (such as * or ?) representing the files that should be synchronized. The default of *.* includes all files.

Exclude Mask(s)
Text, Optional - Default (none)
MARKUP: EXCLUDE="*.doc"

Specifies a wildcard mask (such as * or ?) representing the files that should not be synchronized. If left blank no files are ignored.

Synchronization Method
Text, Optional - Default (none)
MARKUP: METHOD="uni"

Specifies the method by which the files should be synchronized.

The available options are:

uni: The files will be synchronized one way, from folder1 to folder2.

bi: The files will be synchronized both ways, from folder1 to folder2 and from folder 2 to folder1.

Process Subfolders
Yes/No, Optional - Default NO
MARKUP: SUBFOLDERS="YES"

Specifies whether subfolders and files inside them should be included in the synchronization.

Exact Copy in Folder 2
Yes/No, Optional - Default NO
MARKUP: EXACT="YES"

Specifies that, when enabled, files that do not exist in target folder should also be copied. Otherwise only files that are already present are synchronized if they are newer than the original.

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...

Example