Solved

Delete folder that has at least 100,000 files.

Posted on 2007-11-14
3
261 Views
Last Modified: 2008-02-01
I need to delete a folder that has at least 100,000 files in it.  The files are small 1 or 2 KB each but I need a way to delete them.  And it would be all the files in a specified directory.
0
Comment
Question by:casit
3 Comments
 
LVL 6

Expert Comment

by:sabioit
ID: 20285179
0
 
LVL 30

Expert Comment

by:SteveGTR
ID: 20286861
Here a delete command that will do the trick when the current directory is the directory where the files exist:

del /f /q *.*
0
 
LVL 9

Accepted Solution

by:
MSE-dwells earned 500 total points
ID: 20289041
Personally, I always use -

C:\> rd /s /q KillThisFolder

... or if I only want the content removed -

C:\> cd KillThisFolder
C:\KillThisFolder> rd /s /q .

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question