#### Archived

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

# How do I use DOS?

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

## Recommended Posts

How do you enter commands and create directory folders in DOS prompt? I have no idea how to use the damn thing. HELP ME OUT! I have GNU C++ but I can't use it without knowing this. Edited by - Some Guy on January 11, 2001 1:39:32 AM

##### Share on other sites
quote:
Original post by Some Guy
How do you enter commands and create directory folders in DOS prompt? I have no idea how to use the damn thing.

''Nother poor Windows user........
You enter commands using ''the keyboard''

some basic commands:

md (make directory) as in md foobar
cd (change directory) as in cd foobar
copy (well DUH) as in copy foobarsource.txt foobar\foobardest.txt
del (delete) as in del *.* (deletes everything in current directory)
rd (remove directory) only works if the directory is empty
dir (directory ) shows the contents of a directory

Gyzmo
=======================
Meddle not in the affairs of dragons for you are crunchy and go well with toast.

##### Share on other sites

"dir/w/p" is also very handy if you want to see the directory contents instead of let it flying by...

##### Share on other sites
dir/w/o/p is even better though

Also, mkdir & rmdir work if you forget how to command change between dos and linux

dir filename.ext will find the file you want in the current folder (or at least say if it''s there)
While dir filename.ext /s will look in the subdir''s

find works like windows ''find file with text'', only much slower (can be used to find reference code or sumptin..)

That, and what the others said (although less what i just wrote), should be about all you need

eh?

##### Share on other sites
Completely irrelevant but Win2k (not sure if it''s just the server edition) uses *nix commands. Found that out by accident when I typed ls instead of dir. I found this really cool.. so now I no longer use the Windows stuff.

##### Share on other sites
wop

I''d like to add that it''s also possible to show one file type..

ie.
dir *.exe     <- shows all executables in the directorydir *.*       <- shows all filesdir blah*.exe <- shows all executables beginning with blah

##### Share on other sites
Typing "help" should list all commands (I don't know whether this works in the DOS prompt of Win9x/NT though - it works fine on Win2k on my machine)

If you want to save this information as a file, type "help > help.txt". The greater-than symbol redirects output to a file.

To get help on a specific command type "help command " or use the /? switch as richardve said.

Other useful tips:

"cd .." moves you up one directory.

If you get a message like 'someprogram' is not recognized as an internal or external command, operable program or batch file. but you know the program exists then you need to change directory to where the program exists and run it from there, or, if you want to use the program from any directory, add the program's directory to the PATH environment variable.

If you find you are repeatedly having to type a series of commands, such as:

compile myprogram.c
...etc...

then learn how to make batch files. These are just text files with a .bat extension containing a series of commands. You can run a batch file and pass it parameters. For the above example you could create a batch file called "docompile.bat" which would look like this:

compile %1.c
...etc...

Instead of typing all the commands every time you wanted to compile and link a program, you can just type "docompile myprogram mylib". The %1 and %2 in the batch file will be replaced by the first and second parameters after the docompile command.

Edited by - Moot on January 11, 2001 11:45:16 AM

##### Share on other sites
quote:

dir *.* <- shows all files

Well, not quite... It lists all files containing a dot ('.'). dir * lists all files. Sorry to be so pedantic

Edited by - Muzzafarath on January 11, 2001 12:14:05 PM

##### Share on other sites
Nope, the help command is gone under win9x!
(It does exist under DOS 6.22)

cd..   <- move up 1 directory (like Moot already said..)cd...  <- move up 2 directoriescd.... <- move up 3 directories (etc, etc)

NOTE: the "...." thing does only work under win2K (console)

##### Share on other sites
quote:
Original post by Muzzafarath

[ quote ]
dir *.* <- shows all files
[ /quote ]

Well, not quite... It lists all files containing a dot ('.'). dir * lists all files. Sorry to be so pedantic

Edited by - Muzzafarath on January 11, 2001 12:14:05 PM

Almost all files than..

Edited by - richardve on January 11, 2001 12:22:19 PM

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 20
• 14
• ### Forum Statistics

• Total Topics
632950
• Total Posts
3009384
• ### Who's Online (See full list)

There are no registered users currently online

×