# Post a reply

Options

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)

Options

# Topic review

martin
Yes, you can save the commands to .txt.

But the point is that you then specify WinSCP.exe as the program to execute in the scheduler. As the article says:
* Browse for WinSCP.exe executable.

And use arguments like /script=C:\path\to\script.txt /log=C:\path\to\script.log /ini=nul

Or you can use the /command and specify the commands directly on WinSCP command-line. But that may not be convenient, providing the small box in the scheduler.
spaldingl

fairudyn wrote:

Hi I believe you would save your script as a .txt file. Then you will need to create a batch script to trigger your .txt file.

For example the script you listed you saved it as upload index.txt

THen you will need to create a .bat file from a notepad and save it as upload index.bat

On your task scheduler under the Actions Tab
Select Start a Program
And browse to your .bat script

You can leave Add arguments and Start in blank

That is what I was planning on doing, but the windows machine doesn't recognize the commands like cd or open that the unix machine does, so I'm not sure how to fix that in my script.
fairudyn
Hi I believe you would save your script as a .txt file. Then you will need to create a batch script to trigger your .txt file.

For example the script you listed you saved it as upload index.txt

THen you will need to create a .bat file from a notepad and save it as upload index.bat

On your task scheduler under the Actions Tab
Select Start a Program
And browse to your .bat script

You can leave Add arguments and Start in blank
spaldingl

## Task Scheduler/Scripting Basics Help

open sftp://ec2-user@ec2-servernumbers.compute-1.amazonaws.com/ -hostkey="hostkey=" -privatekey="C:\Users\privatekeypath" -passphrase="password" -rawsettings Cipher="aes,chacha20,3des,WARN,des,blowfish,arcfour" ConsiderDST=0
exit