FTP Rename

Description

Renames the file(s) specified on the FTP server. 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: /*.txt|*.bak. All files must be located in the same folder and must be renamed in the same folder.

Declaration

<AMFTPRENAME SOURCE="text" DEST="text" SUBFOLDERS="yes/no" SESSION="text" OVERWRITE="yes/no" ONLYIFEXIST="yes/no" EXCLUDE="text">

Example

<AMFTPRENAME SOURCE="Original_File_Name" DEST="New_File_Name" />

General Tab Parameters

Original name: Specifies the file(s) to rename. This can be a fully qualified UNIX style path and filename (preferred) or a single file (requires use of the FTP 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. Click the Expression Builder icon to build and insert an expression.

Text, Required
MARKUP:
a) SOURCE="/foldername/file.txt"
b) SOURCE="/foldername/*.txt"
c) SOURCE="/foldername/*.txt|/foldername/*.doc"
c) SOURCE="file.txt"

New name: Specifies the new filename(s) for the files specified in Original name.

Text, Required
MARKUP:
a) DEST="/foldername/newfilename.txt"
b) DEST="/foldername/*.txt"
c) DEST="/foldername/*.txt|/foldername/*.doc"
c) DEST="newfilenamefile.txt"

Session name: Specifies the session (created in a previous FTP Log On action) that should be used to perform the folder creation. This allows for multiple simultaneous FTP transfers to take place.

Text, Optional default="default"
MARKUP: SESSION="ServerB"

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 - NO
MARKUP: SUBFOLDERS="YES"

Overwrite existing files: When set to YES (selected), specifies that, if files already exist in the destination folder, they should be overwritten.

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

Only if exist in destination: Valid only if the Overwrite existing files [OVERWRITE] parameter is YES. When set to YES (selected), specifies that only files that already exist in the destination will be copied from the source. All other files, regardless of whether they match the mask or other parameter settings will be bypassed.

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

Exclude mask: Causes the action to not delete any 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)
MARKUP: EXCLUDE="*.txt"

See Also

FTP Log On, FTP Upload, FTP Download, FTP Delete, FTP Rename, FTP Create Folder, FTP Remove Folder, FTP Change Folder, HTTP Post