Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: 'Resume' script option restarts fully downloaded files

There's no easy solution.

Using Newer only together with -resume might do the job. But Newer only is not available in scripting directly, because synchronize replaces that. But synchronize does not allow resuming, as it would not make much any sense.

To get Newer only in scripting, see:
https://winscp.net/eng/docs/faq_script_ini
hawa

Re: 'Resume' script option restarts fully downloaded files

Thanks for the clarification.

Can you please suggest any other script commands or approach to achieve the expected behavior stated in the original post.
martin

Re: 'Resume' script option restarts fully downloaded files

Although I understand this may be confusing, it is by design. I have updated documentation of get and put commands to make this clear.
hawa

'Resume' script option restarts fully downloaded files

WinSCP Versions: 5.1.4, 5.2 Beta
Windows Version: Windows 7 Professional SP1
Transfer Protocol: FTP

Script (file name is FTPBackup.txt):
option batch on
option confirm off
open user@FTPserver
get -resume /*.* C:\FTPBackup\

Command:
WinSCP.exe /console /script=C:\FTPBackup\FTPBackup.txt

Steps to Reproduce issue:
- Have several large files on server
- Let first few files download completely using above script
- Hit Ctrl+C to interrupt and terminate the batch transfer
- Re-run the same script to try completing the transfer

Expected Behavior:
Fully downloaded files are skipped, and partially downloaded file is resumed.

Observed Issue:
Fully downloaded files are downloaded from scratch again (instead of getting skipped).
Edit: Setting 'option batch continue' doesn't help either.

FYI, Partially downloaded file gets resumed as expected. If the last byte is removed, then just that byte is downloaded and WinSCP starts processing the next file as expected.