Synchronize Folders Action

Description

Synchronizes two folders either unidirectionally (one-way) or bidirectionally (both ways), for example, when replicating folders between a computer and the local network or to backup a folder.

Declaration

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

General Tab Parameters

Folder 1: 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 transferred 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.

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

Folder 2: 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.

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

Synchronization: Specifies the method by which the files should be synchronized.

The available options are:

  • Folder 1 ==> Folder 2 (unidirectional): The files will be synchronized one way, from folder1 to folder2.

  • Folder 1 <=> Folder 2 (bidirectional): The files will be synchronized both ways, from folder1 to folder2 and from folder 2 to folder1.

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

Advanced Tab Parameters

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

Text, Optional - Default "*.*"
MARKUP: INCLUDE="*.txt"

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

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

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

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

Exact copy in Folder 2: When enabled, an exact copy of files in Folder1 will be made in Folder2.  Files and folders that exist in Folder2 but do not exist in Folder1 are removed.  If a newer version of the file or folder exists in Folder1, it will be copied to Folder2.

Yes/No, Optional - Default NO
MARKUP: EXACT="YES"

Include read-only: Specifies whether files and folders marked as read-only are synchronized.  If enabled, read-only files and folders are overwritten by the proper source file before the read-only attribute is reset.

Yes/No, Optional - Default NO
MARKUP: INCLUDEREADONLY="YES"

See Also

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