2

I am new to batch and trying to execute a script I wrote, essentially I want to go to a remote server copy the files there and transfer it to a folder in my local directory. I am executing the bactch file but nothing is being copied any suggestions would be great. This is my script

open sftp://site:@ftp.site.net -hostkey="server finger print"
synchronize local C:\Users\localdirectory\Desktop\test2    /Home/folderA/NewFiles
exit

I am positive all the information is correct because that's how I login with WinSCP. I got this script from https://www.youtube.com/watch?v=ndvEYOQLc4c

0

1 Answer 1

2

This is WinSCP script. There's no batch file in your question.

To run WinSCP script, use for example:

"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\path\to\winscp.txt"

(assuming your WinSCP script is in C:\path\to\winscp.txt).

You can put the above command to a batch file.

See guide to scripting with WinSCP.

You can also have WinSCP GUI generate both the script and batch file for you (or even a batch file that directly contains the WinSCP commands).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.