Topic "automated overwrite"

Author Message
techpros

Guest


I have a .bat script that is being run every three minutes to update weather info. But it is asking me every time for every upload if I want to overwrite the existing file. I want to to just automatically overwrite it without asking me. here is my bat file:


cd grayville.org/data

ascii
put "c:\vws\upload\weatherinfo.txt"
binary

put "c:\vws\jpeg\broadcast.jpg"
put "c:\vws\jpeg\vws457.jpg"
put "c:\vws\jpeg\vws458.jpg"
put "c:\vws\jpeg\vws459.jpg"

cd ../../graylight.org/data
binary

put "c:\program files\aninoquisi\lightning2000\lightning.jpg"

ascii

put "C:\Documents and Settings\norman\Desktop\info.txt"
put "C:\Program Files\Aninoquisi\Lightning2000\Nowcasts\lightning.txt"
close
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25017
Location: Prague, Czechia
option confirm off
_________________
Martin Prikryl
MrPatrick

Guest


Hi,

I'm using the following in the middle of a small script to pull down some files from a remote site:

winscp /console /open user:pwd@hostIP /privatekey=pvtkey.ppk /option confirm off /command "get *.* d:\folder" "close" "exit"

The trouble is that I'm still getting asked if I want to overwrite. I'm sure its just my syntax but I've tried all the combinations of the 'confirm off' switch I can think of (having read and re-read the FAQ) and I just can't get it working.

Other than that I've got it all working. Can you help?!

Thanks,
Patrick
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25017
Location: Prague, Czechia
winscp /console /command "open user:pwd@hostIP -privatekey=pvtkey.ppk" "option confirm off" "get *.* d:\folder" "close" "exit"
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