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
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="D:\Transferlog\WinSCP.log" /ini="nul" ^ /script="UploadScript.txt" ^ /keepuptodate D:\RCL-510A /Elements_1Tb/kamera set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%