Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

dan_naw

Hello,

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
get -delete
.

Topic can be closed.
martin

Re: Question concerning get -delete and synchronizing in general

Not sure what you mean by "verification". The get -delete downloads the file and removes it only after successful download. If there are multiple files to be downloaded it downloads first file, deletes it, download second file, deletes it. If I understand your problem corrects, this is just enough for you.

IMHO, the Deleting remote files after successful remote to local synchronization article is way too complicated and unnecessary for your goal.
dan_naw

Question concerning get -delete and synchronizing in general

Hi everyone,

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 :D

Best regards,
Daniel

/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.