Post a reply

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)


Topic review


Re: Download + Delete Automation

I do not see anything in your code that would connect anywhere.
So it's difficult to tell, what you are actually doing.

Anyway, WinSCP GUI can generate a WinSCP download script or a complete batch file for you:

Download + Delete Automation


I am just getting to grips with WinSCP and looking to download a file from a clocking terminal that I am using via FTP. I want to automate this so every X number of minutes a scheduled task runs a batch file which opens WinSCP logs into the terminal via FTP and downloads then deletes one file in particular.

I figured out the opening and logging in automation with the batch file and the program opens and connects fine but no matter what I do I cannot figure out how to automate the download of a file from the terminal to my PC.


start "" "C:\Users\J.Stephens\Desktop\WinSCPDirect"


The above batch file opens the program and automatically logs in but what command would you use to automate a download + delete of a file before closing the program?

I have looked through the Help files and tried multiple commands but unsure what needs to be set and called upon within WinSCP and what can be done via batch file, lets say the file I want to collect from the terminal is "TRANSACTIONS.TXT" and it is located in the root folder of the device, can I simply use the 'get' command in the batch to download this file?

I have tried every command I can see in the help files and even Xcopy in the batch but nothing appears to work, the generate code from within WinSCP also doesn't shed any light on the issue.

"Xcopy /TRANSACTIONS.TXT C:\Users\User1\Documents"?