How do I use DOS?
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
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.
Gyzmo=============================="Well is the world standard" - The Alchemist"Not in Canada!" - jonnyfish
Also, you can type /? after a command for more information about it.
"dir/w/p" is also very handy if you want to see the directory contents instead of let it flying by...
"dir/w/p" is also very handy if you want to see the directory contents instead of let it flying by...
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?
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?
eh?
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.
wop
I''d like to add that it''s also possible to show one file type..
ie.
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
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
link myprogram.obj mylib.lib
...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
link %1.obj %2.lib
...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
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
link myprogram.obj mylib.lib
...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
link %1.obj %2.lib
...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
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
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
Nope, the help command is gone under win9x!
(It does exist under DOS 6.22)
NOTE: the "...." thing does only work under win2K (console)
(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)
quote: Original post by Muzzafarath
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
Almost all files than..
Edited by - richardve on January 11, 2001 12:22:19 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement