/NewSync <target_folder_path> <source_folder_path> [-existingfiles <keep|delete>] [-include_patterns <files_wildcard_patterns>] [-include_attrs <attributes_list>] [-exclude_patterns <wildcard_patterns>] [-exclude_attrs <attributes_list>] [-exclude_subfolders] [-feature <feature_name>]
Synchronizes a folder from the project with one from the disk. This command line corresponds with the functionality from the Edit Filters Dialog.
- The path of the project folder that is synchronized.
- For predefined folders from Files and Folders Page, Identifiers of the folders should be used instead of their names
- If the target folder path contains two or more predefined folders, only the identifier of the parent predefined folder should be used. For example, if the synchronized folder is located in “Program Files\Common Files” you should use the following path : “CommonFilesFolder\SynFolder” in Target Folder Path field
- The path of the source folder from the disk.
- [-existingfiles <keep|delete>]
- The existing files from the project folder will be kept or deleted when this new synchronization is applied.
- [-include_patterns <files_wildcard_patterns>]
- Specify what files or types of files will be added to the package. Read more in the Edit Pattern Dialog.
- [-include_attrs <attributes_list>]
- Specify the attributes of the files that will be added to the package.
The attributes list is: readonly, hidden, system, archive, temporary, sparse, reparsepoint, compressed, offline, encrypted
- [-exclude_patterns <wildcard_patterns>]
- Specify what files or types of files will be left out of the project. The exclude patterns can be configured so they apply only to files, only to folders or both. To include only folder patterns use dirs# followed by the pattern string. To include only files patterns use files# followed by the pattern string. If neither dirs# or files# is specified the pattern will apply by default to both files and folders. See the second example below for the syntax and read more in the Edit Pattern Dialog.
- [-exclude_attrs <attributes_list>]
- You can specify the attributes of the files that will be left out of the package. See -include_attrs above for the attributes list.
- Include this parameter if you don't want to include the synchronized folder's sub-folders in your project.
- [-feature <feature_name>]
- The feature which will contain this folder synchronization operation.
In the following example all the files that are present in APPDIR\SyncFolder will be deleted when the synchronization is applied. The project folder will contain only the files from C:\MyProjFolder source folder.
AdvancedInstaller.com /edit MyProject.aip /NewSync APPDIR\SyncFolder C:\MyProjFolder -existingfiles delete
In the following example all folders that end with config and another character will be excluded from the synchronization. Also, all ReadOnly, Temporary and Archive files will be included except TXT and XML.
AdvancedInstaller.com /edit MyProject.aip /NewSync APPDIR\SyncFolder C:\MyProjFolder -include_attrs "readonly | temporary | archive" -exclude_patterns "dirs# *config? | files#*.TXT | *.XML"