Topic "'Resume' script option restarts fully downloaded files"

Author Message
hawa
[View user's profile]

Joined: 2013-05-01
Posts: 2
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Although I understand this may be confusing, it is by design. I have updated documentation of get and put commands to make this clear.
_________________
Martin Prikryl
hawa
[View user's profile]

Joined: 2013-05-01
Posts: 2
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License