Deleting files is very slow in one particular folder

1

My laptop has two SSD drives:

  • C: - m.2 0.5TB
  • D: - 2.5" 1TB

Generally they work fine, at blinding speeds compared to a spinning platter disk. However, there is one folder, C:\temp, which is super slow, and only when deleting files.

As the name suggests, I use the folder to keep temporary files and I do housekeeping now and them by removing unwanted files. Selecting 100 files in Files Explorer and deleting them in any drive or folder is usually instantaneous as instantaneous can be. However, for C:\temp, most of the time it is so slow that I can leisurely capture something like this:

enter image description here

Even calculating the time to delete the files can take more than 30s.

I did not attempt to measure what the speed exactly is or investigate whether any other folder on C: has the same problem, but if the SSD is a problem then my Windows 10 would have ground to a halt as C: contains my OS and paging disk.

What could be happening?

If it is of any impact, the files deleted are usually .wma and .mp3 files.

Old Geezer

Posted 2017-08-22T02:53:20.687

Reputation: 613

That's an interesting issue. Windows does have a tendency to take unnecessary steps before just doing what you want it to do. Like calculating size and time remaining. That alone can take more time than just doing what you want it to do. So, I suspect that it could be the type of files in the folder doing something. But, c:\temp is also a common folder used by many things. Have you tried using the same type of files in a different folder name for a while? I'd also take a look at anti-virus. – Appleoddity – 2017-08-22T03:43:28.523

My next step would be to use another folder. BTW c:\temp was created by me and not by Windows. I have no anti-virus other than that that comes with Windows 10. – Old Geezer – 2017-08-22T03:48:33.327

Windows defender is an anti-virus, so don't rule it out. Let us know what you find out. – Appleoddity – 2017-08-22T03:51:12.593

It could be something to do with permissions. C:\temp is not a typical user drive because it is a subfolder just after the root directory. – Nelson – 2017-08-22T09:39:32.483

I did some informal tests and C:\a has the same problem, but deleting files in C:\a\a was super fast. So it seems @Nelson is correct about a first level folder. But I have never heard of this specification before, and also it's the first PC I think I am experiencing this. – Old Geezer – 2017-09-08T01:08:27.220

Try a benchmark software on the drive and see if you can test where the temp file is being written, and what the drive behavior is like at various sub folders. It could be failure at specific areas of the FAT. See also if you can get more details as to what portion of the file delete is taking so long. – Nelson – 2017-09-08T18:29:44.133

1I have the same problem, but with a directory which is not first level. – Jamie Vicary – 2018-05-01T22:32:49.877

No answers