It is currently 24 Jul 2017 5:00


Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: dos command
PostPosted: 18 Aug 2011 5:21 
Offline
Nouveau
Nouveau
User avatar

Joined: 09 Feb 2011 9:00
Posts: 2
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


Top
   
 Post subject: remove directory tree
PostPosted: 25 Aug 2011 2:40 
Offline
Nouveau
Nouveau
User avatar

Joined: 23 Nov 2010 9:00
Posts: 4
Hi,

you might try sdelete from sysinternals.
http://technet.microsoft.com/en-us/sysinternals/bb897443 or just google 'sysinternals sdelete'
Hope this helps.

Martin


Top
   
 Post subject:
PostPosted: 25 Aug 2011 7:53 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Jun 2007 8:00
Posts: 1148
Location: Ile de France
Hi,
Use the following:
Delete every .bak file in every subfolder starting at C:\temp

C:\>FOR /R C:\temp\ %%G IN (*.bak) DO del %%G

Regards,
Philmalmaison


Top
   
 Post subject:
PostPosted: 23 Sep 2012 4:03 
Offline
Nouveau
Nouveau
User avatar

Joined: 22 Sep 2012 8:00
Posts: 14
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...

_________________
Overseas education consultants


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+10:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved