Topic "How to Disable Confirm Box ?"

Author Message
HeadAche

Guest


Hi,
I am using WinSCP v.4.0.6 Build 358. I:
-logged in using the SCP Protocol
-transfered files with no problems
-figured out how to use the open terminal to send a command to allow a file to run "chmod +x NAMEofFFILE"
-figured out how to use the open terminal to send a command to execute the file to run "./NAMEofFILE"

Now here is my problem, the file executes no problem, but it gives me a list of choices to continue.

Ex: Do you want to erase?
1-For Yes
2-For No

I can't enter the choice because WinSCP give me a Confirm Box that says:

Host has not answered for more than 15 seconds. Still waiting...

Warning: Aborting this operation will close connection

Is there a way to disable the confirm box so I can execute the program I need to? I been reading and learning, but just can't find the right term to answer my question. I finally broke down and decided to post. Appreciate any help.
Advertisements
Guest




Any clue for other search terms at least? Can't believe that there is no way to disable the box to allow you to manually enter a selected choice on the screen without this WinSCP taking over and freezing till the Confirm pop up box comes up and then you are still not able to send commands .....

Sorry, just getting frustrated ......I'll go smoke and check back later...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
HeadAche wrote:
-figured out how to use the open terminal to send a command to allow a file to run "chmod +x NAMEofFFILE"

Easier is to use Properties dialog.
Quote:
-figured out how to use the open terminal to send a command to execute the file to run "./NAMEofFILE"

Easier is to use predefined custom command Execute (File(s) > Custom Commands).

Quote:
Is there a way to disable the confirm box so I can execute the program I need to?

No. WinSCP does not support executing commands that require user input. You would have to modify your command to accept the answer from command line argument. Such as "./NAMEofFILE /yes".
_________________
Martin Prikryl
TS

Guest


Just for another option, if you can't modify ./NAMEofFILE for whatever reason, you can sometimes get away with answering the question via a pipe. For example:
Code:
echo y | ./NAMEofFILE


Or, if you have this program,
Code:
yes | ./NAMEofFILE


If you don't have a yes program, it just prints y-return-y-return-y-return forever, or if you invoke it as "yes n | whatever" it prints n-return-n-return-n-return... When you use |, it takes the output of the command before the pipe and gives it as input to the command after the pipe, hence why this sometimes works.
HeadAche

Guest


Appreciate the help and this little program! Real Tired now and I'm going to crash. Hope you guys enjoy your day Smile
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