Am I correct in assuming if I wanted it to run 6pm to 6am, all I would have to do is have >=12?
The number is not a duration, but real clock (note
DateTime.Now
). So if you want to stop at 6:00 (am), keep my code as it is.
Am I correct in assuming if I wanted it to run 6pm to 6am, all I would have to do is have >=12?
DateTime.Now
). So if you want to stop at 6:00 (am), keep my code as it is.
set TMPPATH=@@@@@@
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://$$$$$$:######@%%%%%%/ -hostkey=""******=""" ^
"put ""d:/dump/*"" ""%TMPPATH%""" ^
for /r "%TMPPATH%" %%f in ("*.*") do move "%%f" "@@@@@@"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
taskkill /f /im "WinSCP.exe"