An example if I were to use the zip command. You said execute zip once the download finishes right? So would it be something like this?
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\WinSCP.log" /ini=nul ^
/command ^
"open sftp://stuff@stuff/ -hostkey="""" -rawsettings FSProtocol=2 ProxyPort=0" ^
"cd /17539" ^
"lcd C:\Backups" ^
"get folder" ^
"get folder" ^
"zip -r "backup-`date +%Y%m%d%H%M`.zip" "backup/"" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
I saw the command in another thread, but I'm not sure if it's the exact one I need to use. Right now I just want to download two folders and zip them into the directory with a timestamp.