How can I delete directories inside a parent directory from DOS command line? I want to delete all the directories under a parent directory without deleting the parent through DOS command line. That case i don't know how many directories exist under parent.
__________________________
affiliateelite ~ affiliateelite.com ~ adgooroo ~ adgooroo.com
dos command
remove directory tree
Hi,
you might try sdelete from sysinternals.
http://technet.microsoft.com/en-us/sysi ... s/bb897443 or just google 'sysinternals sdelete'
Hope this helps.
Martin
you might try sdelete from sysinternals.
http://technet.microsoft.com/en-us/sysi ... s/bb897443 or just google 'sysinternals sdelete'
Hope this helps.
Martin
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
In one line -
Command RD (RMDIR) /s allows you to remove directory and subdirs and files in it, BUT it removes the dir itself too...
If you want to remove EVERYTHING in dir (incl. subdirs AND files) then the two commands option is:
RD /s/q myDir
MD myDir
If this is NOT suitable, then you will have to loop through directory content and RD /s each of the subdirs...
Command RD (RMDIR) /s allows you to remove directory and subdirs and files in it, BUT it removes the dir itself too...
If you want to remove EVERYTHING in dir (incl. subdirs AND files) then the two commands option is:
RD /s/q myDir
MD myDir
If this is NOT suitable, then you will have to loop through directory content and RD /s each of the subdirs...