I m new to this forum, and also quite new to use WinSCP with command line interface.
I recently installed PoE -camera, and I need an batch script to upload my files from my local folder to an router-ftp-server / usb drive.
I'm using batch script with scheduled windows task, to upload and synchronize my files from local folder to remote one.
My problem is that my BATCH script does not close / have TTL to close it after some time, and I didnt find solution from FAQ / Documentation.
Any ideas how to terminate the session, say after 5 minutes after upload?
The goal here is to run this script scheduled like once a week, upload the files and then exit.
Here's the script / scripts I m using. (They are still work in progress, so forgive me that they might have / lack some stuff.)
Upload script to execute with Task Scheduler
Script file, containing the commands etc
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="D:\Transferlog\WinSCP.log" /ini="nul" ^ /script="UploadScript.txt" ^ /keepuptodate D:\RCL-510A /Elements_1Tb/kamera
if %WINSCP_RESULT% equ 0 (
) else (
exit /b %WINSCP_RESULT%
open ftp://USER:PASSWORD@des.ti.nati.on.ip/ -timeout=360 # <-- does not help
keepuptodate D:\RCL-510A /Elements_1Tb/kamera
synchronize remote -preservetime "D:\RCL-510A "/Elements_1Tb/kamera" "