Posted: 2014-09-23 11:08
I am in a situation where i need to download a relatively large amount of .xml files off a ftp server on a daily basis (up to several hundred).
Every 15 minutes new files get pushed onto the ftp server. I am downloading them once per day.
These .xml files are imported into a software by a custom interface afterwards. Therefore the destination folder gets wiped after each import.
I want to delete the files from the ftp server aswell. But I need to confirm the succesful download before deleting the files.
As I am not a coding guy, I hardly rely on the provided documentation on this site (which worked very well till now).
My first question is: does get -delete include a verification?
And second: I do struggle using the simple get command with a time constraint, because I can see cases where data gets overlooked by the script (data gets pushed on the ftp while the script is running, assuming that the <1d period starts after the script has been completed). I searched and found this https://winscp.net/eng/docs/library_example_delete_after_successful_download
But I can't get it to work. I copied it into an editor, put in data like username etc, set executionpolicy on the machine to unrestricted and tried to run the script.
Nothing happens except the cmd/shell window opening and closing. Is there a way to get a log or something?
Thank you very much in advance. I know this thread may look like "here is my situation - do the work for me" but it really is not - I am just not into coding...much. Furthermore - as you may have already recognized - english is not my native language so I hope u can arrange yourselves with my presumably 'germanesque' syntax
/edited some spelling errors
/edit2: I kinda made a mistake in my thinking. There is no need for any time constraint, if i wipe the server entirely after each download. But the question remains the same. If get -delete does not include a file verfication I am in need of another solution.
Location: Prague, Czechia
Not sure what you mean by "verification". The
IMHO, the Deleting remote files after successful remote to local synchronization article is way too complicated and unnecessary for your goal.
Posted: 2014-09-25 09:29
ok, thank you. By "verification" I meant that the programm checks wether the downloaded file has not been corrupted during the download. While this seems unlikely in most cases it is extremely important for this scenario. Getting the downloaded files pushed back onto the ftp server requires a crapload of emails and phone calls. This is just me beeing precautious.
Thank you for your time, ima go with the
Topic can be closed.
You can post new topics in this forum
And it's free!