Problems deleting large number of files - painfully slow....


  1. Posts : 4
    Windows 7 x64
       #1

    Problems deleting large number of files - painfully slow....


    I run a software tool that often generates 75,000 - 100,000 small files that need to be deleted after the software exits. Right now, it can take 8 - 10 minutes to permanently delete all these files from a single run, and I usually have 4 - 8 runs to deal with, so do the math...

    I have tried shift-del to permanently delete but it doesn't work - Windows still copies everything to the recycle bin. (I thought shift-del was supposed to bypass the recycle bin...)

    Also, while moving the files to the recycle bin, I often get an error message: "Error 0x80070050: The file exists."

    Bottom line is that it takes a *really* long time just to delete these files and I need a quicker way to do it.

    What's the solution?

    Thanks in advance,

    rgames
      My Computer


  2. Posts : 499
    Win7 Ultimate x64 SP1 / WCP x64 / Ubuntu 11 x64
       #2

    Hello rgames,

    See if this helps Permanently Delete - Add to Context Menu
    Last edited by Brink; 17 Apr 2012 at 11:24. Reason: replaced link with direct link instead of redirect
      My Computer


  3. Posts : 313
    Vista/Win7/8/10/11 (x86/x64)
       #3

    rgames, mine does the same thing, and you have to realize 75 thousand is a lot of files! ...but I've always noticed 7 takes a lot longer to delete files than XP did, and btw, when you hold down shift-delete notice the prompt that comes up does not really say it's going to the recycle bin, look again, it's a different prompt, but anyway yes you're right it still takes as long, Especially on 75000 files!

    I don't have an answer for you either, but I care about it.
      My Computer


  4. Posts : 3
    windows 7 ultimate 32 bit
       #4

    Workaround / solution - windows 7 slow delete and copy


    In Windows Explorer, shift-rightclick a drive or folder, then from context menu, click "open in new process." Go to the new window, and it will behave normally for copying and deleting large and many files.
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    CMD prompt (batch file) will be faster than the GUI

    Code:
    rd C:\lots-of-files /q/s
      My Computer


  6. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #6

    Separate Partition?


    How about saving the files to their own partition and "Quick Formatting" it, when you want to kill them?

    That should be quick.
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    lehnerus2000 said:
    How about saving the files to their own partition and "Quick Formatting" it, when you want to kill them?

    That should be quick.
    That is a great idea - lets hope that the OP stops back by after all these months
      My Computer


  8. Posts : 742
    MS Windows 7 Ultimate 64-bit SP1
       #8

    You can try right clicking on recycle bin and select "Properties". Here you can select the option,
    "Don't move files to the Recycle Bin. Remove files immediately when deleted."

    Use this option when you wants to delete large number of files. They will be deleted faster than moving to recycle bin. Once deleted, you can reverse this option.

    If you are comfortable with command prompt, you can use the delete command in the folder to delete all the files directly. Deleting from command prompt does not send the files to recycle bin.

    You can use del *.* in the folder to make it empty quickly. But use caution with this command as you may also delete much needed files in that folder. If the temporary files have a unique extensions you may use del *.ext where ext is the unique extension.

    If you know the extensions of the files to be deleted and they are unique, you can add these extensions to the CCleaner program for quickly deleting them. Open CCleaner, go to Options and then Include section. Here you may add custom folders or files in a partition. This will allow you to delete the files in background while you continue working.
      My Computer


  9. Posts : 3
    windows 7 ultimate 32 bit
       #9

    Reply to my own post:
    Actually, in Windows Explorer, you can go to Folder Options and checkoff "Launch folder window in a separate process," then copy and delete will act normally.


    pecarillo said:
    In Windows Explorer, shift-rightclick a drive or folder, then from context menu, click "open in new process." Go to the new window, and it will behave normally for copying and deleting large and many files.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:21.
Find Us