Are you sure you want to transfer multiple files to a single file 'BW' in a directory '/'?
The files will overwrite one another.
If you actually want to transfer all files to a directory '/BW/', keeping their name, make sure you terminate the path with a slash.
File or folder 'switch' does not exist.
System Error. Code: 2.
The system cannot find the file specified
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
My script is
:@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="D:\WinSCP\AgressoUATUpload.log" /ini=nul ^ /command ^ "open sftp://***:****@******/ -hostkey=""ssh-rsa 9999 *****^ "put -nopreservetime switch C:\Stuff\Invoices\NightlyDBExport\FilesTST\*.txt "/AB File Import/UAT/"" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
Any help gratefully appreciated