Solved

Delete folder that has at least 100,000 files.

Posted on 2007-11-14
3
258 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
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 …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now