When deleting files with Windows Explorer it can sometimes be very slow
to delete files, even a single file.
Possible causes and remedies:
The most likely cause of windows explorer taking a long time to
delete a file is the recycle bin. Each time a file is deleted, windows
explorer moves it to the recycle bin. If the recycle bin is full then
when a new file is deleted (and moved into the recycle bin) explorer
will delete something out of the recycle bin to make space. What takes
the time is explorer deciding what to delete and the process of it then
deleting it. It is worth noting that a large number of smaller files
in the recycle bin (or contained in folders that in turn are in the
recycle bin) is more likely to hit performance than a few larger ones.
To determine whether this is indeed the cause of the performance
problem on your system simply empty the recycle bin and try deleting
another file. If when the recycle bin is empty the deletion happens
almost instantly then the recycle bin is the root cause of the performance
problem.
Possible remedies:
Reduce the size of the recycle bin. It is worth noting that
it is not the size of the recycle bin that is the issue but the
number of files that are contained in the recycle bin that leads
to the performance hit. Reducing the size of the recycle bin tends
to have the natural effect of reducing the number of files that
can fit and so will help.
The default recycle bin size is 10%. For most (modern) systems
this is enormous. Take a 20GB disk (which is small by today's
standards), this means that the recycle
bin is 2GB. That's enough to hold all the operating system files
and a number of applications. So it is hardly surprising that explorer
can take an age. Even the minimal recycle bin size of 1% would give
200MB of storage on a 20GB disk. That is still enough to hold a
very large number of files.
Windows Vista allows you to specify the size of the recycle
bin in MB rather than as a percentage of the disk size (as in
previous versions of Windows). Personally I
find a recycle bin size of 250MB is quite adequate (YMMV).
Disable the recycle bin. This can be done by right
clicking the recycle bin icon on the desk top and selecting 'properties'.
Personally I wouldn't advise disabling the recycle bin because this stops you
from being able to undeleting files.
Defragment the hard disk. Anything that does anything
on the file system will benefit from the disk being defragmented.
However the reality of the situation is that you are very unlikely
to get any noticable performance gain from defragmenting
the disk. If you have time then leave your pc to defragment occasionally.
Defragmenting the disk is only likely to be of benefit to applications
that thrash the disk. For most of us it is (mostly) a complete waste
of time.
Less likely, but it is worth checking the disk for problems. A disk
related problem (or file system corruption) can cause unnecessary reads
and re-reads of the disk.
Possible remedies:
A disk check can be done from explorer, right click
the drive and select 'properties'. From there select 'Tools' and
under 'Error-checking' click '[Check Now]'.
Personally I find that the command line utility 'chkdsk' seems
to find errors that the standard disk-check misses. On NT, W2K and
XP systems start a command session and enter:
chkdsk c: /r
Assuming the disk is NTFS it will ask you if you wish to schedule
the check for the next time the system restarts - let it, but be
aware that it may take a while to run.