• 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.

navigating the command prompt

Bglad

Golden Member
Hi all -

I'm trying to use the command prompt... specifically trying to use the HLDS update tool to run a CS server.

Running XP Pro. I run command prompt and try to cd into the Program Files directory and I get invalid directory. Ran a DIR command and it lists the folder exactly "Program Files" and I've typed correctly but no dice. Tried underscores etc. How do I cd into this directory?

I know, noob question but...

Thanks for the help.
 
Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you. Thank you.
 
Glad I could help. 🙂

Sometimes, the Windows XP command prompt will accept path or file names with spaces and unusual punctuation in them, but it is best to put quotes around the name to make sure Windows reads the request as a single name and not as a name with an option/flag attached (i.e.: Program Files may read as "Run Program with the Files option" if you don't put the quotes around it).
 
Well, the quotes did not work.

"Progra~1" did work.

I thought the "~" was a placeholder for filename lengths longer than dos would read. Command prompt isn't really dos anymore. Does the same rule still apply? Can I suppose that the length is 6 characters and this will work for other long file names with spaces as well?
 
Yup the "~1" trick will work for all directory names longer than 6 characters and for those that have spaces in them.
 
try the completion mechanism in the command prompt:
cd c:\Progr<Tab> - it will fill the name of the intended file/folder
 
Hmmm, I love the tab shortcut but doesn't work on my system.

First, I solved the problem so crisis averted, but this became interesting.

I've gotten several different answers from several sources. Seems that certain tricks work only on certain systems. I'm guessing this is because MS has been slowly dropping dos since Win 2K. The command window in Win XP that I am running is really just a dos emulator.

Any thoughts from the people here smarter than me?
 
The command prompt window in XP isn't a "DOS Emulator" at all, though WinXP does offer some DOS emulation ability... the command line interface for XP just retains a lot of functionality conventions from MS-DOS for ease-of-use reasons. Imagine if you had to learn an entirely new command line interface for a new version of Windows (for example, if they used bash for the console shell instead of the DOS-like shell).

The tab key autocomplete trick should work on every WinXP box. It's part of how the command prompt shell works.
 
Back
Top