Topic "script trouble"

Author Message
Guest




I am trying to run a script that will allow me to copy a file from a remote pc. The connection is very slow and is prone to failure. I would like to keeping trying to get the file until it has completed, using the multi file transfer. To do this I used the script below;

batch file:
winscp3.com locahost /console /script=download.scr

script:
option confirm off
option batch on
cd /test/exeter
option transfer binary
get db.bak d:/test/db.bak
close
exit

If the script executes fully then everything is good. Very Happy However, if the file transfer fails and needs to be restarted I get the following message;

Target directory contains partially transfered file '_test_db.bak'. Do you want to resume file transfer? Note: Answering 'No' would delete partially transfered
file and restart transfer.
(Y)es, (N)o, (A)bort: Abort

Since the script always gives a negative response it automatically aborts and never completes.

Can anyone see anything wrong here? Is it a bug? I suspect that 'Abort' maybe a new addition or changed somehow.

Please Help!!! Crying or Very sad

Dave
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Hmm, I suppose that 'option confirm off' should turn off resume confirmation as well.

Meanwhile you have two options:
  • Disable resume confirmation in GUI.
  • Remove partial files before the upload (rm *.filepart - but only if you have 3.7.2 that supports wildcards).

_________________
Martin Prikryl

Last edited by martin on 2005-02-02; edited 1 time in total
Guest




Thanks for your quick reply!

I don't really want to disable resume or delete the fileparts since this was the main reason for using WinSCP.

Would this be something that you may include in future releases?

Thanks once again.

WinSCP is a truley great product!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Quote:
I don't really want to disable resume

I've meant to disable resume confirmation, not resuming at all.

Quote:
Would this be something that you may include in future releases?

Sure.
_________________
Martin Prikryl
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