KB Article #53466
How-To use REMOVEFILE FTP/SFTP user command
-- remove/rename file on remote FTP/SFTP server
-- Automation
How-To use REMOVEFILE FTP/SFTP user command
Resolution
Site and quote commands used for pre_transfer processing However AE_QUOTE and AE_SITE quote commands are used for post transfer processing. AC_QUOTE Cancels the transfer state if quote command does not run successfully.
Usage of REMOVEFILE and RENAMEFILE commands
1. Create new transfer request in Initiator/Receive mode.
2. In the HTTP/FTP tab of the transfer request you can add the command as "AC_QUOTE REMOVEFILE" for FTP user command. When the input transfer is ended, the remote file on the remote sftp server is deleted with the post command "AC_QUOTE REMOVEFILE"
Command to rename a file /move to other location:
Example:
AC_QUOTE RENAMEFILE /xfbindia/users/indxfb03/raajsun/newfile.txt
3. This command can also be used as a script in a transfer request in HTTP/FTP tab:
SCRIPT D:\ftpc.script
Detail of ftpc.script:
AC_QUOTE REMOVEFILE