FTP - Remove folder(s)

Declaration

<AMFTP ACTIVITY="remove_folder" FOLDER="text" SESSION="text" />

Related Topics   

Description

Deletes the folder(s) specified from the FTP server. To specify more than one folder, use wildcards (Example: * or ?). To specify multiple folders or wildcard masks, separate them with a vertical bar (Example: *Folder1|*Folder2).  If any files are contained in the folder(s) to be deleted, they will be deleted as well.

NOTE: An FTP session is required to run this activity. Use the FTP Logon activity to create a session.

Practical Usage

Used to delete one or more folders residing in the FTP server that are no longer necessary or no longer needed.

Parameters

Connection

Property

Type

Required

Default

Markup

Description

Session

Text

Yes

FTPSession1

SESSION="SessionName"

Specifies the session name (created by a previous FTP Log on step) that this activity should originate from. This permits several FTP activities to be linked to a specific session, thus, allowing multiple simultaneous FTP transfers to take place within a single task.  

Folder

Property

Type

Required

Default

Markup

Description

Remote folder

Text

Yes

(Empty)

FOLDER="/home/ftpfolder"

Specifies a fully qualified UNIX style path to the FTP folder(s) to remove. To specify more than one folder, use wildcards (Example: * or ?). To specify multiple folders or wildcard masks, separate them with a vertical bar (Example: *Folder1|*Folder2). See File Masks & Wildcards for more details.

Match case

Yes/No

No

No

MATCHCASE="yes"

If set to YES, indicates that this activity should be case sensitive in relation to the folders being removed. Set to NO by default.

 

Description

Error Causes

On Error

Example

NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

Description:

This sample step deletes folder "/home/ftp/" via FTP, session name "FTPSession2".

<AMFTP ACTIVITY="remove_folder" FOLDER="/home/ftp/" SESSION="FTPSession2" />