I have created a script that connects to a SFTP location in order for me to transfer a specific set of files to said location. When I run the file, it looks like it connects but does not perform the action of synchronizing the files. If I run the file and it connects to a Terminal Window, I can paste the command inside of the window and it succeeds. But I need it to do it from inside of the BAT file without manual intervention. Below is my current code.
winscp.com /command "open sftp://example@sftp.bldr.com/ -privatekey="C:\Users\rewing\AppData\Local\Programs\WinSCP\PrivateKey.ppk"
synchronize remote C:\temp\DART_FTP /opt/ftp/DART/Ponderosa/In
cmd /k
exit"