The Bleeding Edge

My struggles with technology --- an homage to Jerry Pournelle

  • Site Home
  • Blog Home
  • Galleries
  • Contact
  • Underwater
  • The Last Word

Deleting a lot of files in Windows

July 19, 2013 Jim Leave a Comment

When I first started to use Matlab for image processing, I used to save off intermediate images so that I wouldn’t have to recompute them for downstream processing. I’ve since changed my approach, and compute everything as I need it, saving nothing but potentially final results.

I had many directories with ten or fifteen thousand small images in them from the days before I stopped writing the intermediate files. The files didn’t take up much space — probably a few GB total — but they took a long time to backup, and made the backup prescan take too long.

I decided to get rid of them.

I opened up an instance of Windows Explorer, navigated to a directory, found the first file and selected it, found the last file, and shift-clicked on it. Then I right-clicked the whole stack, and picked “delete”.

That went fine, even if it did take a while.

I did it a few more times, and got this:

file delection error

 

 

 

 

 

 

 

 

 

 

That was strange. I clicked “Skip”, and when the deletions were done, I deleted the offending file — the one that had the temerity to “exist” — with no problem.

Then next time I saw the error, Windows Explorer was so nonplussed as to become unresponsive:

explorer hang while deleting files

 

 

 

 

 

 

 

although it was eating up CPU cycles at a prodigious rate:

explorer not responding

 

 

Lucky for me if couldn’t use more than one node:

explorer eating a whole node cpu

 

 

 

 

 

I couldn’t do anything with the Retry/Skip window while it was so confused, so I did some research. Apparently, the Recycle bin goes catatonic when faced with too many files to deleted all at once. Wierdly, the shift-rightclick/pick delete move that’s supposed to keep the deleted files from gong into the recycle bin doesn’t keep this from happening. I can verify that.

There are several workarounds. The one that I used successfully, even while Windows Explorer was tied up in computational knots, is to open up a command line window — handy hint: shift/rightclick on the directory you’re interested in and select “Open command window here” — and use “del”, with appropriate wildcards.

Other more-exotic possibilities:

Create a partition, move the files you are finished with to it, and do a quick format.

Temporarily (or permanently if you’re feeling lucky) changing the recycle bin’s properties to “Don’t move files to the Recycle Bin. Remove files immediately when deleted.”

recycle bin props

 

 

 

 

 

 

 

 

 

 

The Bleeding Edge

← Adobe CC infinite loop Synology RS2212+ OOBE →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

May 2025
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Recent Posts

  • Switching to Macs
  • Keychron Q1 HE Hall Effect Keyboard OOBE
  • MelGeek MADE84 OOBE
  • A terrible Apple design decision
  • HP printing weirdness

Recent Comments

  • Bryn Forbes on ATTO NS-3252 Thunderbolt 3 to 25 GbE adapter
  • Bryn Forbes on ATTO NS-3252 Thunderbolt 3 to 25 GbE adapter
  • Jim on Switching to Macs
  • Jim on Switching to Macs
  • Bryn on Switching to Macs

Legal

  • Privacy Policy

Archives

Copyright © 2025 · Daily Dish Pro on Genesis Framework · WordPress · Log in