Cannot write in DOS-window?????
Results 1 to 3 of 3

Thread: Cannot write in DOS-window?????

  1. #1
    Registered User
    Join Date
    Apr 2001
    Posts
    85

    Question Cannot write in DOS-window?????

    i have to open MS-DOS-batchfile. In there i have to write something down. I open the DOS-window. I read in this window: "press any key". When i do press a key, THE WINDOW IS GONE.


    Howcome???? What to do??

  2. #2
    Registered User
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    478
    You need to edit the batch file. Open notepad and then file open and browse to the batch file and open it, edit or add the text needed and save and close.
    This can be done from a command line as well using the edit command followed by the batch file name.
    If batch file is called something like ipconfig.bat you would from a command prompt type edit ipconfig.bat
    you would however need to switch to the directory where the batch file is stored.

    As for why it opens and prompts to hit any key then closes, is because you are actually running the batch file not editing it, and it has the pause command in it. Pause keeps the window open and prompts for user input to close the window.
    Last edited by futuretech; August 28th, 2002 at 11:54 PM.

  3. #3
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    You can also right click the file and select edit - selecting open will run the batch file.

    Unfortunately unless you add a pause at the end of the file XP will close the the command line box. In 9x you had the check box that allowed you to control the behaviour of whether the dos prompt box remained open or closed automatically. There doesn't seem to be a control for this in XP.

    What you can do however, is to start, run, type in cmd and press enter

    This will open a cmd box (dos) you can then use dos commands to change directory to the batch file you wish to watch run and run it.. the cmd box opened this way will not close when the batch file finishes.
    Never, ever approach a computer saying or even thinking "I will just do this quickly."

Bookmarks

Posting Permissions

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