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.
Need help writing a script? Have any question about ScriptFTP?
Is there a way to accomplish this?

In Visual Basic I would use something similar to this:

Exec ("Del") & $File

this does not work in script ftp, but I need my script to use the ForEach $File in $list function to delete only files in the list, otherwise the script deletes things I need kept, or that are still being transferred.....
Hello MaxDes,

Try this:
Code: Select all# Change current local directory LOCALCHDIR("C:\somewhere") # Retrieve the local file listing $result=GETLIST($list,LOCAL_FILES) # If GETLIST failed stop the script IF($result!="OK")     STOP END IF # For each file in $list... FOREACH $item IN $list     # delete the file     EXEC("del ".$item) END FOREACH