MS-DOS commands


Posted @ 12:02 AM on October 11, 2008 by Ken

MS-DOS

(abbreviation for Microsoft Disk Operating System) is an operating system created by Microsoft. It was based on the Intel 8086 family of microprocessors but you can run the

MS-DOS

_prompter on every operation system, even on Vista. The reason for using

MS-DOS

commands is to get quickly into the desired program or to make changes on hard disks (copy, move, rename, delete, etc directories and files) in a very short time.

There are tons of

MS-DOS

commands most of them, unnecessarily. Here a list of common used

MS-DOS

commands:

cmd

- you get inside the prompter console (START / run / type

CMD

)

For all of these commands to get working you need all the time to get into the directory (cd dir_name) where do you want to make necessarily changes (moving, deleting, renaming, etc)

dir

- list all dir

dir /w
dir /?

- get help

REN /?

- rename get help

MKDIR /?

- make new dir help

dir /w /p

- split the entire content of the directory in multiple screens / pages

dir /p

- split the entire content of the directory in multiple pages

help

- get help

cd\

dir_name or

chdir\

dir_name - get to the desired dir

cd

windows [with space after cd] instead of

cd\

dir_name - get to the desired dir

cd..

- up one level

cd\

- get back to root of dir
C: - get into C:/ partition
A:

MD

DIR_NAME or

MKDIR

DIR_NAME to make a new directory

MD

FILE_NAME to make a new file

RD

DIR_NAME or

RMDIR

DIR_NAME - RD = Removing Directory (delete)

RD

FILE_NAME - removing file (delete)

RD /S

DIR_NAME or RD /S FILE_NAME to delete dir with files and subdir

RD C:\DIR_NAME /S

to run a program: cmd - PHOTOSHOP or any program I need…

REN

FILE_x.TXT FILE_xy.TXT or

RENAME

FILE_x.TXT FILE_xy.TXT

REN FILE_x.txt TICKS AND TRIPS IN COMPUTERS WORLD.TXT - not working

REN FILE_x.txt “TICKS AND TRIPS IN COMPUTERS WORLD.TXT”

- DONE!

ATTRIB

FILENAME.TXT to see de attribute (value) of a file

ATTRIB +R

FILENAME.TXT add R (read only) attribute

ATTRIB -R

FILENAME.TXT remove R (read only) attribute

ATTRIB -R -S -H -A

FILENAME.TXT

ATTRIB +R *.MP3 /S

add read only attribute for all mp3 files of the dir

attributes could be: A (archive), R, H (hidden), S (system file)

DIR *.TXT

- shows up all the files with txt extension

DIR A*.*

- shows up all the files that starts with “a”

DEL FILENAME.TXT OR ERASE FILENAME.TXT
DEL *.TXT - delete all the txt files
DEL *.* - delete all files in that dir

DEL

FILENAME.TXT and RN DIRNAME or RD FILENAME

ipconfig/all

- list the proprieties of your network (IP, MAC, DNS, etc)

D:\ movies COPY shrek.avi E:\

watched movies - will copy sherk.avi file from D:\movies to E:\ watched movies

D:\ movies MOVE shrek.avi E:\

watched movies - will move sherk.avi file from D:\movies to E:\ watched movies
Suppose you have 150 mp3 files in E:\ disco music and you want to moves these files in D:\ all music.
Get your prompter in E:\ disco music (cd disco music) and type

MOVE *.mp3 D:\ all music

Done!

COPY D:\all music\rhapsodic.mp3 E:\symphonic\rhapsody.mp3

- change the name during the copy process

MOVE D:\all music\rhapsodic.mp3 E:\symphonic\rhapsody.wav

- change the name and the extension of file during the moving process

MOVE D:\all music\*.mp3 E:\symphonic\*.wav

- change the extension of all files during the moving process

XCOPY D:\all music E:\recent music /s

- copy all files and directories from D:\all music to E:\recent music except the empty directories (because of /s)

XCOPY D:\all music E:\recent music /e

- copy all files and directories from D:\all music to E:\recent music including the empty directories (because of /e)

Popularity: 31% [?]

Related Posts

If you enjoyed this post, make sure you subscribe to my RSS feed!

  • 7 Comments @ MS-DOS commands
  • RSS

What Is Your Comment?




* = required

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation

Recent Comments
  1. San Diego Real Estate @ 2:03 pm

    What about FORMAT command?

    Star Comment Trackback
  2. admin @ 9:01 am

    Oh yeah, I forgot two important commands:
    FORMAT - FORMAT c: - to format disk c
    FDISK - to make partitions on a disk

    Star Comment Trackback
  3. ByREV @ 8:11 pm

    Cateva comezi dos “secrete”
    getmac, bootcfg, driverquery, fsutil, gpresult, netsh, openfiles, recover, schtasks, systeminfo, tasklist, taskkill, “defrag drive: -b”

    Nu prea le foloseste nimeni :) dar, asa ca sa fie !

    BTW, cred ca’s valabile doar in consola pur MS-DOS (nu ca nu se mai foloseste :D)

    Star Comment Trackback
  4. admin @ 11:24 am

    ByREV, there are some commands working but only one or two from the entire list you gave me.

    Star Comment Trackback
  5. George @ 11:02 am

    And here's another one (not really a command) I recently discovered it works on windows - quick output to a file.

    For example, if you want to create a list with all the files from the “Documents” directory just type in

    'dir >> MyList.txt'

    This will take the output of dir and write to the MyList.txt file. I didn't really know this works in Windows. I always had Cygwin installed :D

    Star Comment Trackback
  6. snowalker @ 3:06 pm

    it sounds interesting. I never used that command before but for sure can be helpfully. Thanks! :)

    Star Comment Trackback
  7. Sfi.com @ 5:25 pm

    [...] Interesting, good enough for me to link to. Hope it helps with your readers. [...]

    Star Comment Trackback