ftp_delete

FTP Functions (ftp)

Deletes a file from an FTP server.

int ftp_delete( char *transaction, <item list>, LAST );

Function objFTP.delete( transaction as String, item_list as String, LAST ) as Integer         ` for VB Script

transactionA transaction name for this step. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
item_listA list of all the items for this function. Enclose all entries with quotes.PATH - path of the file to be deleted, relative to the root directory of the FTP server.or MPATH - Like PATH,but using wildcards to specify multiple files. If wildcards are not used, all files in the MPATH are deleted.ENDITEM - Marks the end of the list (no quotes).
LAST A marker indicating the end of the argument list.

The ftp_delete function deletes a file or files from an FTP server.

This function is for use with global sessions. For multiple sessions, use the ftp_delete_ex function, which allows you to specify a session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.

Parameterization

The following argument(s) can be parameterized with standard parameterization: List of Attributes

Example

In the following example, the ftp_delete function deletes the ftp_file.txt file from the FTP server.

Copy code
// Logon to the FTP server     
ftp_logon ("FTP", "URL=ftp://ftp.microsoft.com", 
         LAST );     

// Delete the file from the FTP server and insert a path to the file you want to delete     
ftp_delete ("Ftp_Delete", 
         "PATH=/pub/for_jon/ftp_file.txt", 
         LAST );     

// Logout from the FTP server     
ftp_logout();