Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
RmDir in File System of MS-DOS Commands
7299 Views
Rmdir command in MS-DOS 
rmdir is remove directory command. It is used to remove directory's.

If there is no file in directory, then use
      rmdir dir_name

To remove multiple empty directories
      rmdir dir_name1 dir_name2....

To remove non empty directories
      rmdir /s dir_name1 dir_name2....
      - It is asking the confirmation to delete given directory.

Demo 
d:\tmp>mkdir images songs videos

d:\tmp>dir
 Volume in drive D has no label.
 Volume Serial Number is 8460-8FB0

 Directory of d:\tmp

05/04/2014  10:53 PM    <DIR>          .
05/04/2014  10:53 PM    <DIR>          ..
05/04/2014  10:53 PM    <DIR>          images
05/04/2014  10:53 PM    <DIR>          songs
05/04/2014  10:53 PM    <DIR>          videos
               0 File(s)              0 bytes
               5 Dir(s)  13,269,868,544 bytes free

d:\tmp>rmdir images

d:\tmp>dir
 Volume in drive D has no label.
 Volume Serial Number is 8460-8FB0

 Directory of d:\tmp

05/04/2014  10:53 PM    <DIR>          .
05/04/2014  10:53 PM    <DIR>          ..
05/04/2014  10:53 PM    <DIR>          songs
05/04/2014  10:53 PM    <DIR>          videos
               0 File(s)              0 bytes
               4 Dir(s)  13,269,868,544 bytes free

d:\tmp>rmdir images
The system cannot find the file specified.

d:\tmp>rmdir songs videos

d:\tmp>dir
 Volume in drive D has no label.
 Volume Serial Number is 8460-8FB0

 Directory of d:\tmp

05/04/2014  10:54 PM    <DIR>          .
05/04/2014  10:54 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  13,269,868,544 bytes free

d:\tmp>
Next Topics
Next lessons of current book.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Previous Topics
Previous lessons of current book.
File System of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details