Topic "Scripting RM and not get prompted"

Author Message
Chrishov

Guest


Im trying to remove the contents of my root SFTP directory before I upload a new file. Unfortunatly it promts me to say Y or N.

Here is a basic look at what im doing.

# Disable overwrite confirmations that conflict with the previous
option confirm off
# clear contents on SFTP server
rm *
# Upload the file to current working directory
put E:\upload\*.zip

Problem is the option confirm off does not appear to work for the "rm" command

Ive searched the documentaion and have not figured out how to accomplish this. Can anyone point me in the right direction?

Thanks in advacne.
Chris
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
I'm not aware of any prompt with rm command.
Can you post a screenshot?
_________________
Martin Prikryl
chrishov

Guest


My bad. I was mistaking the prompt for the rm command but it was for a del command in my batch file. Thanks for the quick reply though
Guest




Hi,

I am trying to remove a file in a VM and put a new file with the same name in that directory. But somehow the file is not getting removed. When i tried to remove the file manually it is throwing a prompt asking " remove regular file xxx.xml?". how can I input yes into this prompt when run from bat script.

Below is the code i am using:
"C:\Program Files (x86)\WinSCP\WinSCP.com" username:passwrd@xx.xxx.xxx.xxx "option confirm off" "option batch abort" /command "rm /usr/local/web.xml" "put e:\web.xml /usr/local/web.xml" "exit"

Thanks in advance!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
The rm command does not ask for configuration.

Can you show us a screenshot?
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