|
Delete File Action |
Declaration |
<AMFILEDELETE SOURCE="text" SUBFOLDERS="yes/no" ISNEWERTHAN="date" ISOLDERTHAN="date" EXCLUDE="test" ATTRFILTER="text"> |
See Also |
Copy File, Move File, Rename File, Delete Folder, Rename Folder |
Deletes the file(s) specified. To specify more than one file use wildcards ( e.g. * or ? ). To specify multiple files or wildcard masks, separate them with a vertical bar. Example: c:\*.txt|c:\*.bak
Usually used to delete single or multiple files.
Specifies the file(s) to delete. 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 delete files matching a certain mask. Multiple file and/or file masks may be specified by separating the entries with the | symbol.
When set to YES, specifies that, if present, subfolders should be searched for files matching the mask specified in the "Source" [SOURCE] parameter
Causes the action to not delete 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)
Causes the action to only delete file(s) 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).
Causes the action to only delete file(s) 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).
This group of settings causes the action to filter which files are deleted based on the attribute settings of the source file(s). In visual mode, a group of controls are provided to assist in the selection of this parameter.
In markup mode, build a single text item must be specified that contains the attributes of the files you wish to rename.
Available Options:
R - Read only - Specifying "+R" causes files with this attribute turned on to be included, "-R" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
A - Archive - Specifying "+A" causes files with this attribute turned on to be included, "-A" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
S - System - Specifying "+S" causes files with this attribute turned on to be included, "-S" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
H - Hidden - Specifying "+R" causes files with this attribute turned on to be included, "-H" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
C - Compression - Specifying "+C" causes files with this attribute turned on to be included, "-C" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.
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...
<AMFILEDELETE SOURCE="c:\folder1\*.*">
<AMFILEDELETE SOURCE="c:\folder1\*.*" SUBFOLDERS="YES">
<AMFILEDELETE SOURCE="c:\folder1\*.*" ATTRFILTER="+r+a">
<AMFILEDELETE SOURCE="c:\folder1\*.*" SUBFOLDERS="YES" OVERWRITE="YES" ISNEWERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%">