Move Remote Files Via Batch/Script
One of our FTP partners dumps .txt and .xlsx files to a root directory; when we have finished grabbing the files they have dumped, we move them to an Archive directory under root.
Currently we do all this in the WinSCP GUI, but I would like to automate this process, and I have got it to where I can pull the files without trouble using a batch file and Task Scheduler, but I have a problem:
I don't know how to move files on the remote server into the Archive folder to show them we have retrieved these.
This is the text file I have set up so far, which is called by the .bat file by Task Scheduler.
***
# ftpfromXYZ.txt
option batch on
option confirm off
open sftp://username:Password@partner.site.com:22
get -resume *.txt "\\Local-srv\Secure$\Downloads\XYZ\"
get -resume *.xlsx "\\Local-srv\Secure$\Downloads\XYZ\"
close
exit
***
Any ideas how I would move a wildcard file to a directory under root on the source server?
Currently we do all this in the WinSCP GUI, but I would like to automate this process, and I have got it to where I can pull the files without trouble using a batch file and Task Scheduler, but I have a problem:
I don't know how to move files on the remote server into the Archive folder to show them we have retrieved these.
This is the text file I have set up so far, which is called by the .bat file by Task Scheduler.
***
# ftpfromXYZ.txt
option batch on
option confirm off
open sftp://username:Password@partner.site.com:22
get -resume *.txt "\\Local-srv\Secure$\Downloads\XYZ\"
get -resume *.xlsx "\\Local-srv\Secure$\Downloads\XYZ\"
close
exit
***
Any ideas how I would move a wildcard file to a directory under root on the source server?