Put command, what am I missing
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\FTPlog\WinSCP.log" /ini=nul ^
/command ^
"option confirm off" ^
"put C:\XXXX\XXX\filename.xlsx /xxx/xx/xxx/upload" ^
"exit" ^
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
I've removed the connecting info, but if I dont have filename.xlsx in there it works without issues and uploads the files.
I want to upload the specific file with a timestamp then remove the file locally after i am done.
Something is missing, either """ or something not sure.
Please helppp
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\FTPlog\WinSCP.log" /ini=nul ^
/command ^
"option confirm off" ^
"put C:\XXXX\XXX\filename.xlsx /xxx/xx/xxx/upload" ^
"exit" ^
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
I've removed the connecting info, but if I dont have filename.xlsx in there it works without issues and uploads the files.
I want to upload the specific file with a timestamp then remove the file locally after i am done.
Something is missing, either """ or something not sure.
Please helppp