How to delete 8 million files

Page 1 of 2 12 LastLast

  1. Posts : 4
    Windows 7 Professional x64
       #1

    How to delete 8 million files


    I'm not exaggerating.

    Apparently some Window Media Player service went beserk (probably over some time), and has created eight million files in .....\LocalMLS

    Select this in any explorer or explorer alternate, click delete, and wait. For a very long time.
    Use DOS CMD prompt, navigate to the directory, type either RMDIR /s or DEL *.JPG, and wait. For a very long time.

    Days - and, as far as I can tell, not much useful has happened.

    It's possible that these commands have to first make sense of the directory, then act on it.
    Doesn't seem likely that anything is going to make sense of this.

    I've looked for a utility (or command) that sort of acts like an axe (or a sledgehammer), but I've come up empty.

    Thoughts are welcome.

    MichaelAngelo
      My Computer


  2. Posts : 3,371
    W10 Pro desktop, W11 laptop, W11 Pro tablet (all 64-bit)
       #2

    If it truly is taking days to delete that many files, it would be faster to backup the system (not those files), format, re-install OS then restore data files.
      My Computer


  3. Posts : 2,177
    Windows 8.1 Pro x64
       #3

    Hi and Welcome to SevenForums,

    It seems like you have attempted to do it a couple of ways in Windows... if you are familiar with Linux you could try a Linux Live CD and try deleting the files through that?

    I have found that when Linux deletes something it's pretty quick via command line.
    Linux Live CD's - The LiveCD List

    Regards,
    Jamie
      My Computer


  4. Posts : 2,752
    Windows 7 Pro x64 (1), Win7 Pro X64 (2)
       #4

    MichaelAngelo68 said:
    I'm not exaggerating.

    Apparently some Window Media Player service went beserk (probably over some time), and has created eight million files in .....\LocalMLS

    Select this in any explorer or explorer alternate, click delete, and wait. For a very long time.
    Use DOS CMD prompt, navigate to the directory, type either RMDIR /s or DEL *.JPG, and wait. For a very long time.
    Did you click DELETE, or SHIFT+DELETE??

    If you just click DELETE Windows will want to put the file in the recycle bin, for possible resurrection. Eventually, if you "empty trash" the files will truly be vaporized from the recycle bin.

    If you instead use SHIFT+DELETE then the files are instantly vaporized, bypassing the recycle bin completely. Permanent and instant delete.

    If you really want to get rid of everything in this \LocalMLS folder, I'd use SHIFT+DELETE.

    So which was it??
      My Computer


  5. Posts : 4
    Windows 7 Professional x64
    Thread Starter
       #5

    I understand the difference, and the performance implications of each.

    In this case, I don't get far enough to choose between DEL and SHIFT-DEL

    Windows has to gather up information about eight million files before it can get to the "Do you want to delete all these files? Well, do you?" prompt.

    Thanks for responding.

    MichaelAngelo
      My Computer


  6. Posts : 2,468
    Windows 7 Ultimate x64
       #6

    MichaelAngelo68 said:
    Windows has to gather up information about eight million files before it can get to the "Do you want to delete all these files? Well, do you?" prompt.
    It's the normal behavior of Windows Explorer, it sort of "counts" the files before even begin to delete anything. Del vs Shift+Del is an Explorer-only thing too. Also, Explorer is terribly slow for anything of any volume, so 8 millions files will make it crawl like never before!

    Really, you don't want to use Explorer.

    I think a command prompt is the best choice here. It runs silently and don`t gives any clues about progress but it just does its thing. With such an amount of files however, it will take ages no matter what you do. Leaving it overnight seems to be the best option.
      My Computer


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

    Fancy (non-free) imaging programs might allow you to back up all of your drive except that folder.

    If so, you could simply:

    • Create a backup image
    • "Nuke" the partition
    • Restore your backup image
      My Computer


  8. Posts : 5,642
    Windows 10 Pro (x64)
       #8

    Delete the root folder from command prompt, not the individual files.
      My Computer


  9. Posts : 2,177
    Windows 8.1 Pro x64
       #9

    Is booting from a Live CD not an option as per my note #3 ?
      My Computer


  10. Posts : 1,049
    Windows 7 Pro 32
       #10

    There's a thread were they've done some testing and comparing. The preferred way in a command prompt to avoid screen output:

    del /f/s/q foldername > nul

    Mass deleting files in Windows - Super User
      My Computer


 
Page 1 of 2 12 LastLast

  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 17:42.
Find Us