SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    San Francisco, CA, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sending a DOS command that requires a Y/N response

    Hello all,

    I'm trying to run a command line for our application.

    If I run manually, from a command prompt, after I enter my command, the prompt comes back with a message 'Are you sure you want to do this? (y/n):' at which I can type y<enter>.

    I'm trying to use the silk SYS_Execute method to accomplish this, but I can't figure out how to tell it to follow the initial command with a 'y <enter>'. Sending a second SYS_Execute() just sends a separate prompt, so that's not useful. The lsOutput from the SYS_Execute command shows that it's getting the '...(y/n):' prompt.

    Any suggestions on how to complete the command?

    Thank you in advance,

    -Chris

    ------------------

  2. #2
    Junior Member
    Join Date
    May 2001
    Location
    San Francisco, CA, USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending a DOS command that requires a Y/N response

    Hi all,

    Never mind, I found a way to do this. What I had to do was to pipe in a file name to the command line. So I did:
    SYS_Execute('...command... > file.txt')
    Where the file.txt contained just the letter 'y'. That worked for me.

    Thanks,

    -Chris

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending a DOS command that requires a Y/N response

    Way to go Chris !!!



    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending a DOS command that requires a Y/N response

    I believe you can pipe using unix way under dos. ex: 'del *.*|y' anyhow there might be exceptions.

    ------------------

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending a DOS command that requires a Y/N response

    In my experience of command-line tools, it seems to be conventional to code them so that you can set a command-line flag to activate whatever options are required, without it requiring further attendance and input. Maybe you should ask your developers to add a few more options?

    ------------------

  6. #6
    Moderator
    Join Date
    May 2001
    Location
    SanJose,CA,USA
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:04 AM.

Copyright BetaSoft Inc.