Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Discovery

Incomplete file transfer

Yes that's right ☺️.
martin

Re: Incomplete file transfer

So, do you mean that you want to start 2=>3 download only after 1=>2 transfer finishes, so that you do not download incomplete files?
Discovery

Incomplete file transfer

In my senario files getting transfered to SERVER-1 to SERVER-2 I'm using WinSCP script to download files from SERVER-2 to SERVER-3.

You are right I'm using -delete parameter to delete files after download completes.

Need your advice,
Best regards.
martin

Re: incomplete file transfers

Discovery wrote:

My script seems to start moving files to new destination before its completed at source location.

Sorry, this quite vague. By "moving", are you referring to WinSCP -delete switch? What do you mean by "completed at source location"?

Im sure WinSCP wait for a file to completly download and after that it start moving file to new destination.

Again, not sure what you mean by "start moving". If you refer to get -delete, there's no "moving" really. It's download and delete.
Discovery

incomplete file transfers

Hi everyone,

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