troubleshooting Question

How to delete subdirectory's using batch file!

Avatar of Yogeshup
Yogeshup asked on
Microsoft DOSWindows Batch
4 Comments1 Solution3155 ViewsLast Modified:
Hi,

I'm looking for a .bat/.cmd file which able to delete all sub-directory's for given path in the parameter, it should delete all sub-directory's "except" the folder which is having today's date ie...

Sample sub-directory's

20080514
20080515
20080516
20080517

Let say we pass the Path to .bat file "C:\MyDirecotry"  -- now this program should delete all subdirectory's under this folder but except the folder having todays date! ie "20080517"

we assume today is 17th May 2008.

Thanks in advance


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros