environment (WinSCP version is 5.11, Windows 7 Enterprize)
Im facing the a problem in my script. some files are getting transfer but incomplete.My script seems to start moving files to new destination before its completed at source location. Im using "option batch continue" with parameters -delete -resume -neweronly and -timeout=300.
Im sure WinSCP wait for a file to completly download and after that it start moving file to new destination. Is it like this ? any suggestion to fix this problem. My script is attached below.
Thanks and regards.
@echo off FOR /f "tokens=2-4 skip=1 delims=(-)" %%G IN ('echo.^|date') DO ( FOR /f "tokens=2 delims= " %%A IN ('date /t') DO ( SET v_first=%%G SET v_second=%%H SET v_third=%%I SET v_all=%%A ) ) SET %v_first%=%v_all:~0,2% SET %v_second%=%v_all:~3,2% SET %v_third%=%v_all:~6,4% REM ===================================================== :loop "C:\Program Files\WinSCP\WinSCP.com" ^ /log="d:\WinSCP-Log_%dd%_%mm%_%yy%.LOG" /ini=nul ^ /command ^ "open ftp://user:password@my-ip:221/ -timeout=300 " ^ "OPTION BATCH CONTINUE" ^ "GET /* c:\folder1\* -delete -resume -neweronly" ^ "exit" timeout /t 60 goto loop