Topic "Question concerning get -delete and synchronizing in general"

Author Message
[View user's profile]

Joined: 2014-09-23
Posts: 2
Location: Germany
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

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 Very Happy

Best regards,

/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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
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.
Martin Prikryl
[View user's profile]

Joined: 2014-09-23
Posts: 2
Location: Germany

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.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License