Archived

This topic is now archived and is closed to further replies.

What exactly is the command line?

This topic is 5215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I''m learning to program with console apps at the moment and i was wondering if someone could explain a little about the command line in windows xp. Is it like a version of dos in the background or something? Also, is there any books or pages on the net that show you how to use it, like the different commands and stuff. Thanks for any info

Share on other sites
It is, essentially just a place to type commands.
With older versions of windows, they sort of were running on top of DOS but this isn't true with XP as I understand it.

Here is a reference of all the commands.

In addition you can type a command followed by a /? to get help on it.
Eg: ping /?

[edited by - rayno on November 13, 2003 1:11:11 AM]

Share on other sites
Cool, Thanks Rayno

Share on other sites
The command line is useful if you create your game/app to take arguments as these can be entered on the command line when you run your program - much like writing a batch file which i think is more efficient as you dont have to bring up a console window each time you want to test your program out

Share on other sites
On this topic, does anyone know how to give command line arguments to VS.NET when running apps without opening up a prompt?

Or is there anyway to change the default working directory in WinXP? There doesn't seem to be a switch for it. Navigating to My Documents/Visual Studio Projects/Project 5/Debug is a pain with the 8 character limit.

Of course that's a pain when you need to move resource files into the debug directory.

[edit2] This kinda works Assuming your name is administrator. Stick it in a batch file.

command /k cd c:\Docume~1\Admini~1\MyDocu~1\Visual~1

My first question would still be best though

[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people

[edited by - wild_pointer on November 13, 2003 10:43:38 AM]

[edited by - wild_pointer on November 13, 2003 10:58:23 AM]

Share on other sites
quote:
Original post by wild_pointer
On this topic, does anyone know how to give command line arguments to VS.NET when running apps without opening up a prompt?

Right click your project name in the solution explorer to get the project properties dialog, go to 'Debugging' and set your command, command line arguments, working directory etc. from there.

[edited by - Sandman on November 13, 2003 11:04:27 AM]

Share on other sites
quote:
Original post by wild_pointer
Or is there anyway to change the default working directory in WinXP? There doesn''t seem to be a switch for it. Navigating to My Documents/Visual Studio Projects/Project 5/Debug is a pain with the 8 character limit.

8 character limit? Surely you''re not using command.com on XP?

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share on other sites
Yes? Uh oh, what am I missing.

 Ha, cmd.exe. I never even realized they were different.

[edited by - wild_pointer on November 15, 2003 8:48:30 PM]

cmd.exe ...

Share on other sites
You probably don''t know this either, then: Add a REG_DWORD key called "CompletionChar" to HKEY_CURRENT_USER\Software\Microsoft\Command Processor and set the value to 9. That will give you tab completion for filenames and directories.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share on other sites
quote:
Original post by Arild Fines
You probably don''t know this either, then...

You are correct, sir.

[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people