Question Trying to delete Very large folder, taking hours and hours

Jan 9, 2021
60
3
4,535
I have a desktop computer, running Windows 10, which used to be backed up with windows file history. Everything is backed up to an external hard drive , and I wanted to start freeing up some space on the hard drive . Since I don't use windows file history anymore I figured I would delete the folder . I tried to delete the folder and about six hours later it's still in "discovery" mode. 2.558 Million files so far at 427 GB worth.

It can't even tell me estimated time remaining, it just says "calculating. lol.

Obviously it would be so much faster just to reformat the whole external hard drive and start over, but just for future reference, is there a quicker way to delete a large folder? Can you compress it? Would that be quicker and then delete it? EDIT: Forget I just asked that lol. Compression would still leave the original folder duh :rolleyes:

It seems ridiculous, that if I just simply wanna know the size of the folder, and right click, then properties, it would still take hours and hours to discover everything just to tell me the size of the folder.

I'm gonna let it run all night out of curiosity just to see when the hell it's gonna stop and how many millions of files are in there, from file history backing up for however long it was (a year or two not sure)

thanks
 
if I just simply wanna know the size of the folder, and right click, then properties, it would still take hours and hours to discover everything just to tell me the size of the folder
it wouldn't unless there is an issue with the disk or the OS itself.

right-clicking on my 4TB, or 8TB, or any of my drives instantly shows the disk properties.
and deleting any of the folders, even those hundreds of GBs in size, also almost instantly delete.

tried to delete the folder and about six hours later it's still in "discovery" mode. 2.558 Million files so far at 427 GB worth
did you first turn off the File History option?

it's possible that the OS is preventing this data from being removed or is just busy constantly accessing some of it and hindering the process.
 
  • Like
Reactions: steveace
You could try using the RD command from an elevated command line which would hopefully go around the whole "discovering" phase.

Code:
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if ok to remove a directory tree with /S
 
  • Like
Reactions: Nigel Spike
Jan 9, 2021
60
3
4,535
it wouldn't unless there is an issue with the disk or the OS itself.

right-clicking on my 4TB, or 8TB, or any of my drives instantly shows the disk properties.
and deleting any of the folders, even those hundreds of GBs in size, also almost instantly delete.


did you first turn off the File History option?

it's possible that the OS is preventing this data from being removed or is just busy constantly accessing some of it and hindering the process.
Yes, File History is off. It's been off, and currently backing up with Windows Backup and Restore (Windows 7)
 
Jan 9, 2021
60
3
4,535
You could try using the RD command from an elevated command line which would hopefully go around the whole "discovering" phase.

Code:
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if ok to remove a directory tree with /S

Interesting, I'll try that.
 
If I right-click the drive, it instantly shows me available space and used space
if I just simply wanna know the size of the folder, and right click, then properties, it would still take hours and hours to discover everything just to tell me the size of the folder
there is definitely still some connection between the OS & this folder that is prohibiting access in some way.

it may just be the way the data is compressed by the OS or some problem that has occurred with that data being corrupted.

if the recommended command line approach doesn't work
boot into Safe Mode and try manually deleting again.
 
Jan 9, 2021
60
3
4,535
UPDATE:
So the RD /S "FileHistory" seems to have worked,and apparently has allowed me to skip the "discovery" phase and get right to permanent deletion. It seems to be actively deleting all the files and subfolders in the File History folder now......however

Bad news is.....after 3 hours, it's still deleting :(

Under the directory of the external hard drive, I looked at the creation date of the File History folder, and it shows December 26, 2015. lol. So I don't know how many years this external hard drive was backing up using File History, but it was many years. I turned off File History Back about 2 years ago, but that File History folder still has many years of backups.

For all I know the folder could be near 2 Terabytes large. (it's a 4 TB hard drive, and it's about 1/2 full but it also has other Windows Backup & Restore backups, and other stuff so who knows)
:LOL:

qXi7qQY.jpeg


So bottom line, the best way to clear space on this external hard drive, would have been reformat the whole drive, and temporarily remove what I wanted to keep to another drive beforehand.

From what I understand it's takes a lot longer to delete (and move) a whole ton of small files, compared to a bunch of large files. And I'm sure there are tons and tons of very small files accumulated over the years.

I may just stop the deletion process because I don't wanna wear out the stupid external hard drive lol

Thanks for all the suggestions everyone.
 
There is a method I use when I have a clients PC and want stuff gone but don't want the OS redone.

I go into the folder where all the items that need to be trashed are located. I make a new folder and than grab a chunk of the unwanted data and throw in folder.

I repeat again new folder 2 grab a chunk and throw it into new folder 2.

On and on until it's all in smaller chunks and I may end up with 30 or 40 folders but for speed this works.

The next trick is to go into each folder right before you hit delete right click and darken all and rename everything something stupid like 01.

Deleting goes extremally fast from folder to folder.

Dump each folder by themselves and yes a little work on your side but will get you finished in a lot less days but in a couple of hours or most likely less.
 
Last edited:
Jan 9, 2021
60
3
4,535
There is a method I use when I have a clients PC and want stuff gone but don't want the OS redone.

I go into the folder where all the items that need to be trashed are located. I make a new folder and than grab a chunk of the unwanted data and throw in folder.

I repeat again new folder 2 grab a chunk and throw it into new folder 2.

On and on until it's all in smaller chunks and I may end up with 30 or 40 folders but for speed this works.

The next trick is to go into each folder right before you hit delete right click and darken all and rename everything something stupid like 01.

Deleting goes extremally fast from folder to folder.

Dump each folder by themselves and yes a little work on your side but will get you finished in a lot less days but in a couple of hours or most likely less.
Very interesting!! I may just try that if I end up cancelling the never-ending deletion process. Good info for future reference too.

Thanks
 
Jan 9, 2021
60
3
4,535
I should also let you know to here and there empty your Recycle Bin as your dumping folders to keep you getting bogged down later. :)
thanks. But from what I understand, and I certainly could be wrong, the current method I am using to delete the file history folder, (dos prompt: RD /S "FileHistory") does not move the files to the recycle bin but directly permanently deletes them , hence the whole idea of avoiding the discovery phase of all the files prior to deletion. At least, that's what I think is going on lol.
 
Jan 9, 2021
60
3
4,535
UPDATE:

I stopped the deletion process. After about 4.5 hours, it only deleted 340 GB of data from the File History folder. Crazy.

Maybe there is a discovery phase of the deletion process, even going through the Dos command? hmm. don't know, but if I really want that File History folder gone, I will have to reformat the drive, I don't want the w external hard drive churning away for days on end deleting something that I can be done with much more easily with a re-format.

Before and After regained space after 4.5 hours of deleting.....lol
bIM6xf7.jpeg
 
Last edited:
For your USB external drive, it's been like this since Windows XP. For some reason, even if in Device Manager you set the disk Policies from Enable Write Caching to optimize for Quick Removal, deleting files on USB ever since has always been much slower than the behavior in Windows 2000 and earlier, which was blink-and-you-miss-it for the dialog box. Now it may be true that 2000 merely sent the delete command to the drive and considered the task finished (instead of verifying, so the contents could get corrupted if you unplugged it too quickly after deleting), but man was it fast and responsive feeling.

So if I am going to be deleting a huge folder full of system files, I'll usually plug it into or live boot to an alternative OS that perhaps doesn't respect Windows permissions quite so much. It just saves a bunch of time even if you have to chkdsk it after.

You could also try using 7-Zip to delete the folder.
 
  • Like
Reactions: stonecarver

TRENDING THREADS