Thank you very much!
My script works correctly.
After using
My script works correctly.
After using
TIMESTAMP
feature and testing results via /log
.
TIMESTAMP
feature and testing results via /log
.
/log=C:\path\to\winscp.log
command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.TIMESTAMP
feature?
... "get *%%TIMESTAMP-1D#yyyy-mm-dd%%.csv" ...
set WinSCP="C:\winscp\winscp.exe"
cd C:\lftp-4.6.5.win64-openssl\bin
date.exe "+%Y-%m-%d" --date="1 day ago" > C:\Temp\tmp
set /p x= < C:\Temp\tmp
del C:\Temp\tmp
set protocol=ftp
set user=MY_USER
set password="MY_PASSWORD"
set host=SOMEHOST
%WinSCP% %protocol%://%user%:%password%@%host% /command "lcd C:\recon\input" "get *%x%.csv" "exit"
get *%x%.csv
x
= 2020_02_03