• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

couple basic dos questions

NleahciM

Senior member
Hey - so I need to do some things in "dos" on a computer running windows xp pro sp2. So mostly right now I have two problems:

1. how do I change to a directory with a space in it's name? I'm trying to switch to c:/program files. Can't figure out how...

2. How do I make a shortcut for something to run in dos? So that when it finishes running, the command window will stay up so that I can read the output?

Thanks for your help!
 
Originally posted by: KLin
1. either cd progra~1 or cd "program files"

2. Can you elaborate a little on what you mean?

A ha! I had tried program~1 - but I couldn't remember how many letters dos names were shortened to. I had also already tried the one with the quotation marks but it didn't work 🙁 but pgora~1 did!

What I mean about the shortcut is that some programs when you run them in dos will quickly say write something and then finish, bringing you back to the dos prompt. But if you just make a shortcut to a program like this, it will run in dos, then the entire dos window will close, thus you can't see any output from the program after it has finished. To get around this I simply open up a dos prompt and find the correct program and run it from dos that way - but that's just kind of a pain...
 
The typical solution is to add a read statement at the end of your program so that it will not exit until the user hits enter.
 
Set up a batch file to run the program.
Put an input statement after the execution statement.

You may also be able to set the properties of the shortcut to not close on exit.
 
Just wanted to point out that it's not DOS, it's the Command Line Interface (CLI). While Windows 9x included DOS, Windows NT/2000/XP do not.
 
Originally posted by: MrChad
Just wanted to point out that it's not DOS, it's the Command Line Interface (CLI). While Windows 9x included DOS, Windows NT/2000/XP do not.

:thumbsup:
 
Originally posted by: MrChad
Just wanted to point out that it's not DOS, it's the Command Line Interface (CLI). While Windows 9x included DOS, Windows NT/2000/XP do not.

Hence why I quoted "dos" in my original post 🙂
 
Hey, I have a question too! When I run a program from a BAT file, the program opens but the prompt stays open and I have to alt-tab and close it then go back to the program. Is there a command to add to tell it to close itself when its done launching the program? I have win98 if thats any help.
 
Back
Top