ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
I have to send a file, named "ps404*.txt" to a "work" folder then rename the file to an "inbound" folder to prevent premature pick up of the file from the "inbound" folder.

When I try using the RENAMEFILE command as structured below, I get an error I do not understand.
RENAMEFILE("work/ps404*.txt","inbound/ps404*.txt")
***** RENAMEFILE Error #12002: If the first parameter is a wildcard the second must be in the format: *.extension
I have also tried RENAMEFILE("ps404*.txt","inbound/ps404.txt") with the exact same result.

Any ideas?
I completely forgot this thing, sorry.

The RENAMEFILE command supports wildcards but only to change the
extension of a group of files. To apply RENAMEFILE to multiple files
the way you want try the following:
Code: Select allCHDIR("/work") GETLIST($list,REMOTE_FILES,"ps404*.txt") FOREACH $file IN $list  RENAMEFILE($file,"/inbound/".$file) END FOREACH  
I supposed that the remote directories "work" and "inbound" are in
the root folder.