I am currently running a script which downloads files once a day from a remote FTP server. After performing the download, and manipulating the data, I want to make another trip back to the server and delete only the files that I previously downloaded. I cannot simply do a:
because files are continuously written to the ftp server at somewhat random times, so one or more records which I have not previously downloaded may appear on the FTP server between the time I finish the download and am ready to delete the files. I'm currently using a script that looks something like:
open ftpes://UserId:Pasword@URL// -Explicit
# Change the remote directory
But that is not working, and on occasion, there may be more than 1000 records. How do I change that script to delete multiple files at a time?