That was it.. Thx Martin! something so simple and overlooked.
- Guest
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
"put -latest ""C:\...\YardiDNALBTest\*"" /inbound/FRESN865_LBFRE_2/" ^
.csv
file in my local directory but I just want to upload the latest file every morning, so I am using the -latest
switch, is this accurate? Please help!
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\bin\script\log\test.log" /ini=nul ^
/command ^
"open sftp://xxxxxx@domain.com/ -hostkey=""ssh-rsa 2048 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx="" -privatekey=""C:\temp\id-rsa.ppk"" -rawsettings ProxyPort=0" ^
"put -latest ""C:\Data\Shares\Accounting\Yardi Lockbox DNA\YardiDNALBTest\*"" /inbound/FRESN865_LBFRE_2" ^
"exit" ^
echo %ERRORLEVEL%
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%