Here is what I have for the code and I believe I have over simplified things
open sftp://remotedba:123456@66.66.66.666/ -hostkey="ssh-rsa 2048 76:aa:aa:66:66:f6:ea:b6:94:d3:38:73:38:bd:67:bb"
# mv *.xlsx /Reports *.*
exit
# Execute the script using a command like:
# "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /script="C:\path\to\script\script.txt"
I don't know how I have to identify the source folder and the destination folder. I have a source location of fs-1/fs-e/ETL and a location of K:/programinfo/reports.
Also, I am going to have ten different folders that I want to send from and to. Can I set it up to change the directories of the source and local files in succession like
cd fs-1/fs-e/ETC/pgm1
lcd k:/programinfo/reports/pgm1
mv *.xlsx /pgm1 *.*
cd fs-1/fs-e/ETC/pgm2
lcd k:/programinfo/reports/pgm2
mv *.xlsx /pgm1 *.*
Once I have this the only other question is how to run this every hour or once a day or on some set schedule?
Thanks in advance for the help.