Get & Put with WinSCP

Advertisement

CarterJohn11
Joined:
Posts:
1
Location:
USA

Get & Put with WinSCP

Hey All,

I'd like to move files from "C:\Jobs\AF_SYNC\" and put them in a remote FTP folder. Once uploaded I'd like to delete the file from the "C:\Jobs\AF_SYNC\".

In addition I'd like to automate a get or sync between a remote FTP folder and a local "C:\Jobs\AF_INPUT\" directory. Is there a way to script this out in WINSCP then save as a batch file that I can schedule?

Some of these files will be pretty large so if possible some checks to make sure it uploaded correctly would be great.
Thank you for any assistance if someone has already done this.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,128
Location:
Prague, Czechia

Re: Get & Put with WinSCP

CarterJohn11 wrote:

I'd like to move files from "C:\Jobs\AF_SYNC\" and put them in a remote FTP folder. Once uploaded I'd like to delete the file from the "C:\Jobs\AF_SYNC\".
Just do
put -delete "C:\Jobs\AF_SYNC\*" "/remote/path/"

In addition I'd like to automate a get or sync between a remote FTP folder and a local "C:\Jobs\AF_INPUT\" directory. Is there a way to script this out in WINSCP then save as a batch file that I can schedule?
WinSCP can generate a script template:
https://winscp.net/eng/docs/ui_generateurl#script

See also:
https://winscp.net/eng/docs/guide_automation
https://winscp.net/eng/docs/guide_schedule

Reply with quote

Advertisement

You can post new topics in this forum