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.....
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:
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
liked Script FTP? Try our other product Email Parser