Download + Delete Automation

Advertisement

zenithwfm
Joined:
Posts:
1
Location:
UK

Download + Delete Automation

Hello,

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.

"@ECHO OFF

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

Exit"

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"?

get "/TRANSACTIONS.TXT" ?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum