Solved

fast delete a number of files

Posted on 2006-06-12
9
11,727 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
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, …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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