How can I delete a folder with infinitely nesting subfolders in Windows 11?
Asked by
ClearSpace99
I've run into a weird issue while cleaning up my Downloads folder on Windows 11. There's a folder, let's call it X, which contains a never-ending series of nested folders: Y, Z, Y, Z, and so on. I tried exploring it, but my file explorer crashed when it got too deep. Now, this mess is taking up 20 gigabytes, and I desperately need to clear some space. I really just want to delete these folders. Can anyone help me figure out how to do that?
Answers
If that doesn't work, Powershell might help. Try running this command (make sure to edit it with your username): `Remove-Item -Path "C:Users[YOUR USERNAME HERE]DownloadsX" -Recurse -Force`. This should forcefully remove the folder and its contents.
Reply to this answer
A quick way to delete the main folder is by right-clicking on X, holding Shift, and hitting Delete. Just be careful, though, because this kind of folder structure can sometimes indicate malware. Keep that in mind while you're cleaning up!
ClearSpace99: Tried that, but the file explorer crashed again, and the folder is still there. It definitely feels like malware at play!
Reply to this answer
Add your answer
Answers are reviewed before publication.
ClearSpace99: I tried the Powershell command, but I got a 'DirectoryNotFoundException' error. Not sure what that means!