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.
Any ideas?
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")I have also tried RENAMEFILE("ps404*.txt","inbound/ps404.txt") with the exact same result.
***** RENAMEFILE Error #12002: If the first parameter is a wildcard the second must be in the format: *.extension
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:
the root folder.
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 all
I supposed that the remote directories "work" and "inbound" are inCHDIR("/work")
GETLIST($list,REMOTE_FILES,"ps404*.txt")
FOREACH $file IN $list
 RENAMEFILE($file,"/inbound/".$file)
END FOREACH
Â
the root folder.
liked Script FTP? Try our other product Email Parser