Categories
MS DOS

MS DOS Tutorials – How to Create, Delete, Change, Rename Directory and Files

MS DOS Tutorials – Learn MS DOS with an ease
This tutorial will show you how to create or change or delete or rename a directory (called a folder in windows) and how to create sub-directories within a directory, and how to check the list of directories present in your working directory

How to print something on the screen in MS DOS ?

echo – mainly use for displaying or printing messages alternative use is to on/ off the prompt message
echo [message] -> will print the message

echo [on | off] -> will set the prompt on or off
you can check your echo settings by simply writing in the echo command in your prompt

How to create a directory in MS DOS ?
md techytuts
the above command will create a directory with the name techytuts

How to change the present working directory in MS DOS ?

MS DOS is a single taking operating system. You can work with only 1 file/folder at a time and to work with a particular file/folder you first need to open it as you do in Windows. This navigation is achieved through the CD command. However changing through drives don’t require any commands. By default you will be in C:\ drive in your my documents directory. To simply change to D Drive write in d: and press enter. Similarly write e:, f: for changing to e drive and f drives respectively..
cd [directory name]
(cd followed by 2 periods takes you one level up i.e to the parent directory)
cd..
(cd followed by backslash periods takes you to the top directory i.e directly under the drive)
cd\

How to delete an directory in MS DOS ?

To delete a directory
rd [directory name]

rd sample
The above command will delete the directory named sample from the present working directory if it exists

How to know the number of files and directories in the present drive ?
dir -> shows the number of directories in your present working directory

dir /d -> to display the output in column wise order

dir /w -> to display the output in page wise order asking for your requisition to continue
How to rename a directory or file?
ren [old name] [new name]-> used for renaming a file or directory

rename [old name] [new name] -> used for renaming a file or directory
for example if you got a file named one.txt, then to rename this file to two.txt write the below command
ren one.txt two.txt
How to create files and sub-directory in a directory ?

As we know, the command used for creating the directory is md. The same command applies for creating a sub – directory however in this case you need to change through the working directories to create sub directories.

cd [directory name] -> this command will enter into the directory which is present in you drive

The next tutorial will be on how to create a file how to move a file and how to add text in a file and finally how to view this text file in ms dos till then have a nice day. And please do write a comment. Your comments helps us improve.

Related posts:

  1. MS DOS Tutorials – Learn MS DOS with an ease
  2. How to create or delete a System Folder Named CON in Windows XP
  3. MS DOS Tutorials – How to change colors in DOS prompt
  4. How to create Ebooks and PDF Files using Google Docs
  5. How to create Zip/Compressed archives in Windows XP