What is the proper syntax for passing ScriptFTP GETLIST $item variables to local MS-DOS commands using the ScriptFTP EXEC command?
In my case, I want to upload a list of files from a local directory, then move each file to a different local directory only if it uploaded successfully.
But I don't know where to go from here. I know that I need to something like but I don't know how to use the $item variable so that my MS-DOS command executes FOREACH $item IN $list, moving each local file only after it uploads.
Any ideas or thoughts are welcome! Thanks!
In my case, I want to upload a list of files from a local directory, then move each file to a different local directory only if it uploaded successfully.
FTP Script
FTP Script
Any ideas or thoughts are welcome! Thanks!
You can use the dot (.) to concatenate text strings in order to build the EXEC parameter.
If $item is for example test.txt the EXEC command parameter will be:
https://www.scriptftp.com/d/ftp-miscellaneous-commands/exec
FTP Script
move test.txt C:\destination_dirIf you think that the file name may contain spaces, for example New text document.txt . You should take a look at the Remarks section of EXEC help topic:
https://www.scriptftp.com/d/ftp-miscellaneous-commands/exec
liked Script FTP? Try our other product Email Parser