Solved

fast delete a number of files

Posted on 2006-06-12
9
11,712 Views
Last Modified: 2010-12-13
Hello,
I have some offline websites. I had more than 15000 files and folders( all stored in a foler). Deleting all these things is a nightmare, even when i used winrar(I checked delete files after finished). It took a lot of time. I wonder whether there is a software can wipe all these file within a minute? Thanks
0
Comment
Question by:binocular222
9 Comments
 
LVL 23

Expert Comment

by:basicinstinct
ID: 16884168
why not just delete the top-level folder?
0
 

Author Comment

by:binocular222
ID: 16884239
Windows can delete but very slowly. 15000 file!
0
 
LVL 15

Expert Comment

by:deepaknet
ID: 16884423
Did you try using command prompt?
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Accepted Solution

by:
Night0wl earned 25 total points
ID: 16884522
using windows will probably be the fastest solution because it only removes the header informarion from the files, unllike winrar which parses the files into memory and compresses it thus adding another step to the process. The easiet way is probably a combination of basicinstinct and deepaknet. Use a command line and navigate to the top-level folder and type rmdir foldername /S or go in one folder and type del *.* /S and then delete the top-level folder. Using the /S switch will surpress the warnings windows gives when you delete a hidden file, a sytem file (thumbnail caches) or a read only file. This way you can set it up to run over night.
0
 
LVL 10

Assisted Solution

by:GuruGary
GuruGary earned 25 total points
ID: 16886019
Yes, I agree with deleting them through the command prompt.  To update the notes from Night0wl, the /S will delete subdirectories, and it is the /Q parameter to supress the warnings.  So be VERY CAREFUL using this as it is easy to delete unwanted information using this.  Use:

rd /q /s "X:\path\to\top level directory\"
0
 
LVL 7

Expert Comment

by:CitizenRon
ID: 31027282
In case anyone else find this in a search:
 
 I had a cleanup project to do on a server that someone else "worked"  on.  They left 11,600,000 files in 412,000 folders behind on a drive  that desperately needed the space and I had to get it cleaned ASAP  without doing anything bad to the server.
 
 I used a trick with ROBOCOPY.EXE to delete those 11.6 million files in  just a couple hours.  Use the MIRROR (/MIR) switch (which copies or deletes files as needed to make the Destination folder and EXACT copy of the Source folder) with RoboCopy and  copy an empty folder to the  folder containing all the files you need quickly removed.
  1. Create a Temp folder, something like "C:\RoboTemp"
  2. Copy the folder to the folder you want deleted using the /MIR  switch
  3. ROBOCOPY C:\ROBOTEMP C:\FOLDERTODELETE /MIR
  4. Sit back and watch the files disappear lightning fast
  5. Delete the now-empty folder that used to contain millions of files  and the empty Temp folder
  Something about the way RoboCopy deletes files when mirroring makes it extremely fast, faster than any other (free) method I've found in Windows.
 
0
 

Expert Comment

by:mbooher
ID: 34340955
CitizenRon,

You have saved me HOURS of time - thanks for this GREAT suggestion!  It is working like a champ!  Using Win7, my system was deleting about 2 files per second.  Now it is ZIPPING along!!!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

21 Experts available now in Live!

Get 1:1 Help Now