Description |
Compresses files into the file specified. To specify more than one file to compress use wildcards ( e.g. * or ? ). To specify multiple files or wildcard masks, separate them with a vertical bar. Example: c:\*.txt|c:\*.bak |
Practical Use |
Usually used to compress files before backing up or in preparation for transfer over the Internet via email or FTP. |
Declaration |
<AMCOMPRESS TYPE="options" SOURCE="text" COMPRESSION="options" PATHINFO="options" EXCLUDE="text" OVERWRITE="yes/no" ISNEWER="yes/no" ISNEWERTHAN="datetime" ISOLDERTHAN="datetime" ARCHIVETURNOFF="yes/no" PASSWORD="text" DOSFORMAT="yes/no" ATTRFILTER="text"> |
Example |
<AMCOMPRESS SOURCE="c:\sourcefolder\*.*" FILE="c:\targetfolder\targetfilename.zip" COMPRESSION="fast" PATHINFO="none" EXCLUDE="*.txt" OVERWRITE="YES" ISNEWER="YES" ISNEWERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%" ISOLDERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%" ARCHIVETURNOFF="YES" PASSWORD="test" DOSFORMAT="YES" ATTRFILTER="+a"> |
General Tab Parameters |
Files to Compress: Specifies the file(s) to compress. 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 copy all files matching a certain mask. Multiple file and/or file masks may be specified by separating the entries with the | symbol. Text, Required Destination File: Specifies the destination folder and filename for the file(s) being compressed. This should be a fully qualified path with a filename. Folders that do not exist will be automatically created at runtime. Text, Required Compression Type: Specifies the type of compression that should be used for the file(s) being compressed. Automated Workflow supports the following compression types: ZIP, CAB, LHA, JAR, GZIP, TAR Text, Optional default - "zip" Level of Compression: Specifies the level of compression that should be used for the file(s) being compressed. The more compression that is used the slower the process. "none" is the fastest option. The available options are:
Text, Optional default - normal |
Options Tab Parameters |
Include subfolders: When set to YES (selected), specifies that, if present, subfolders should be searched for files matching the mask specified in the "Source" [SOURCE] parameter Yes/No, Optional default - YES
Yes/No, Optional default - relative Overwrite if exist: When set to YES, specifies that, if matching file(s) already exist in the compressed file they should be overwritten. Yes/No, Optional default - NO Only if newer: Available only if the "Overwrite if exist" [OVERWRITE] parameter is YES. When set to YES, specifies that only matching files that are newer than those in the destination compressed file will be overwritten. Yes/No, Optional default - NO Turn archive attribute off: When set to YES (selected), specifies that the "archive" attribute of the source file(s) should be switched OFF. The Windows "archive" attribute is generally used to track whether a file has been backed-up, by turning the source file's archive attribute off - this indicates to many backup programs that the file has already been backed-up. Yes/No, Optional default - NO Store files in DOS 8.3 format: When set to YES (selected), specifies that the filenames in the compressed file should be truncated to their 8.3 DOS style equivalents. Should only be enabled if the compressed file will be used on an older operating system that does not support long filenames. Yes/No, Optional default - NO Password protect files: If specified, causes the compressed file to be password protected - thus the user will be prompted for a password upon extraction. Text, Optional default - (none) no password Exclude Mask: Causes the action to not compress files matching the mask(s) specified. Filenames or wildcard ( e.g. * or ? ) masks may be used, multiple entries may be specified by separating them with the | symbol (e.g. *.txt|*.bak) Text, Optional default - (blank) Only if newer than: Causes the action to only compress files if the source is newer than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter). date, Optional default - (none) MARKUP: ISNEWERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%" Only if older than: Causes the action to only compress files if the source is older than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter). date, Optional default - (none) Click Custom to select from other time options (Last 30 seconds, Last 30 minutes, Last 24 hours, Last 30 Days, Last 12 Months, Last 5 Years, Next 30 Seconds, Next 30 Minutes, Next 24 Hours, Next 30 Days, Next 12 Months, Next 5 Years). A expression appears in the text box (e.g., %DateAdd( "s", -30, CStr( Now() ))%) and the Expression check box is selected. You can also click the Expression Builder icon to build a custom expression. |
Attributes Tab Parameters |
Attributes: This group of settings causes the action to filter which files are compressed based on the attribute settings of the source file(s). In visual mode, a group of controls is provided to assist in the selection of this parameter. In markup mode, a single text item must be specified that contains the attributes of the files you wish to compress. Available Options:
Text, Optional (blank) |
See Also |