FTP Rename Icon

FTP Rename

Declaration

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

See Also

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

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.

Practical Usage

See description.

Parameters

General Tab

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

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.

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

Specifies the new filename(s) for the files specified in Original Name.

Session Name
Text, Optional default="default"
MARKUP: SESSION="SeverB"

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.

Options Tab

Include subfolders
Yes/No, Optional default - NO
MARKUP: SUBFOLDERS="YES"

When set to YES, specifies that, if present, subfolders should be searched for files matching the mask specified in the "Source" [SOURCE] parameter

Exclude Mask
Text, Optional default - (blank)
MARKUP: EXCLUDE="*.txt"

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)

Notes

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...

Example