My Script looks like this... (I've changed sometimes of security)
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="P:\TK20FileInfo\WinSCP.log" /ini=nul ^
"open sftp://cofcit:MayKey@huwey.tk20.com/ -hostkey=""ssh-Classified"" -privatekey=""P:\TK20FileInfo\TK20PRI.ppk""-passphrase=""Music"^
"lcd T:" ^
"cd /home/cofcit" ^
"put tk20_StudentTranscriptfile.txt" ^
"put tk20_StudentTestfile.txt" ^
"put tk20_StudentTablefile.txt" ^
if %WINSCP_RESULT% equ 0 (
) else (
exit /b %WINSCP_RESULT%
The first issues I had is that the file had prompted for the passphrase..but I saw that I could included it in the open line.
the documentation on the actual syntax didn't include an example so I took a stab at it...it doesn't work.
what is the actual syntax.
The second issue I had. (before I tried to include the passphrase) was after it connected is that the script stopped executing right after "LCD T:"^ and the command window leaves me at a prompt.
any and all help appreciated.