View Full Version : DOS Commands - Help needed


Avalon
25-03-2005, 15:38
Hi all

I am compiling a document for friend of mine detailing the most commonly used DOS commands...so far i have:

cd - Change Directory
mkdir - Make Directory
ping - PING
tracert - Trace Route
dir - List the directory contents

Can anyone think of any more? IF so please post them AND any switches they may have...for example the "dir" command has two switches: /w and /p....see what i mean? :suspect:

xafier
25-03-2005, 15:40
with windows xp you just need one command ;)

and that command is "help" which will list all the commands, or "help <command>" which will give details of <command>

:)

[edit]
and before some smart arse comes in here calling me stupid and saying the DOS in windows XP isn't actually DOS, I already know that ;) I worked with PC's when windows was just a not so pretty extension of DOS, oh and I'm talking about 3.1, I know 95 and 98 were just as bad :hihi:

JoeP
25-03-2005, 15:42
If you type in dir /? you'll get the list of switches.

del - deletes a file - e.g. del fred.txt will delete the file fred.txt. del *.txt will delete all text files.

rmdir - removes a directory

copy <source> <dest> - copies a file from <source> to <dest>

Joe

Avalon
25-03-2005, 15:45
Originally posted by JoePritchard
If you type in dir /? you'll get the list of switches.

del - deletes a file - e.g. del fred.txt will delete the file fred.txt. del *.txt will delete all text files.

rmdir - removes a directory

copy <source> <dest> - copies a file from <source> to <dest>

Joe

DUHH!!! :loopy: How could i forget COPY! :loopy: :help:

JoeP
25-03-2005, 15:52
Originally posted by xafier

I worked with PC's when windows was just a not so pretty extension of DOS, oh and I'm talking about 3.1, I know 95 and 98 were just as bad :hihi: [/B]


I remember that DOS 3.0 was the first DOS OS I played with in the early / mid 1980s, having been tinkering with CP/M before that. DOS 3.0 was a pig, IMHO DOS 3.1 was the first one worth bothering with, then we had DOS 4.0 (a pig again!) and 5 onwards were OK!

I've still got a machine somewhere partitioned with DOS 3.1. Every now and again I run something on it and have a 'blonde' moment when I try and type a DOS 6 command in to a DOS 3.1 prompt! :)

carriewarr
25-03-2005, 16:26
Del *.* is always a good one!

If you bring up a dos prompt and type 'help' you'll get a whole long list of them.

Cheers, Carrie

sccsux
25-03-2005, 16:26
Try this link (http://www.computerhope.com/overview.htm) for MS DOS commands, or this one (http://www.dewassoc.com/support/msdos/dos_commands.htm);).

Sidla
25-03-2005, 19:32
There's loads. Ping and tracert aren't even common ones.

A few common commands off the top of my head:
md - make directory
cd - change directory
rd - remove directory
del - delete a file
deltree - delete a directory and all data within it
copy - copys a file or directory
xcopy - a more advanced version of the above
dir - list directory contents
attrib - display (or change) file attributes
ren - rename a file
format - formats a drive
fdisk - create hard disk drive partitions
more - displays the contents of a file
doskey - creates a 'link' to a different command (e.g. doskey ls=dir, which I always use because I'm used to Linux)
edit - edits the contents of a file
diskcopy - copies a drive
path - displays/changes the current path (place where it looks for executable files)

That's all I can think of for now, i'll come back if i think of any more. If you're not sure what any command does

Lickszz
25-03-2005, 20:31
chkdsk
chdir
cls
rename
label
echo
dir/s
dir/ad
undelete
time

Internetowl
25-03-2005, 20:56
rm is a good one to use with the correct syntax

Gazza
25-03-2005, 21:01
im sure you can type the same HELP command in DOS if I recall.

check out this site for further info

http://www.computerhope.com/msdos.htm


ahhh - it was command /? just looked it up in the said site

BobDaBuilder
26-03-2005, 10:40
Nbtstat - is the only one I know and I believe that's actually net BIOS anyway but if you want listings for that I know of a few...

Sidla
26-03-2005, 13:11
Originally posted by Internetowl
rm is a good one to use with the correct syntax
That's Unix, doesn't work in DOS.

BobDaBuilder
26-03-2005, 13:32
Exit is usually a good one as well...afterall computers were made with GUI's to make your life easier, why revert back to command prompt..? you'll give them idiots @ MS the idea we all like it and they'll bring it back...

JoeP
26-03-2005, 13:39
Originally posted by BobDaBuilder
Exit is usually a good one as well...afterall computers were made with GUI's to make your life easier, why revert back to command prompt..? you'll give them idiots @ MS the idea we all like it and they'll bring it back...

Sometimes the use of a batch file containing DOS commands can save a lot of faffing around in terms of repeating tasks on a regular basis.

I'd be horrified if we went to a wrold where you couldn't use them - just this last week I wrote a 6 line batch file that dealt with shifting files between servers that would have took 2 minutes to write and another 5 minutes to get in to a timed job.

Had I been trying to do the same withing with Windows Scripting or Perl it would have taken me much longer for no benefits.

Joe

BobDaBuilder
26-03-2005, 13:48
In which case I stand corrected...I suppose there are real benefits from using it but I just don't understand it, all I ever get is syntax error...I wish someone would write a book (There's an idea for ya Avalon) or a website as it does look pretty professional IMO if someone can use command prompt rather than windows...

There are plenty of sites out there I reckon that give you commands in foreign languages and you need to be a whizz kid to get your head around but what the world is missing is one in plain English seein as that's what 3/4 of the worlds population speak...lol

JoeP
26-03-2005, 15:06
I started programming 'professionally' in the final year of my degree in 1982, so I had a fair amount of coding before Windows came along.

Command line stuff isn't that difficult - I think someone mentioned that if you type in the name of the command with /? following it it will give you the syntax.

99% of the time I never give a thought to a command line, but just occasionally the command line commands offered by DOS are invaluable.

sccsux
26-03-2005, 15:06
Originally posted by BobDaBuilder
There are plenty of sites out there I reckon that give you commands in foreign languages and you need to be a whizz kid to get your head around but what the world is missing is one in plain English seein as that's what 3/4 of the worlds population speak...lol


There are also plenty of sites written in English that cover MS-Dos comands (some in-depth, others not so).


A quick google revealed many such site, 2 of which I posted here (http://www.sheffieldforum.co.uk/showthread.php?s=&threadid=33735&perpage=15&pagenumber=1#post343615).;)

Internetowl
26-03-2005, 16:02
Originally posted by Sidla
That's Unix, doesn't work in DOS.

You are correct -

it was of course 'rmdir' which works fine - Ive just done it to test on my test machine.

I can confirm it was successful.

adaline
26-03-2005, 16:17
Batch files are a life saver when u develop windows service applications that need to be installed as a service even just to debug. With batch files its a snap! One to install, one to unistall :thumbsup: long live comand prompt!

Pete1024
26-03-2005, 20:09
You missed a big one:

Ipconfig

Especially in NT/XP/2000
Oh and

Net

such commands as dos commands are very useful for logon scripts!

Gazza
26-03-2005, 22:51
:thumbsup: :loopy: :thumbsup: :loopy: