»X« Posted June 1, 2018 Share Posted June 1, 2018 I had two directories which are .Trash-999. I managed to delete the first one by adding my user in permissions with full control. However the second folder is more troublesome. I've added myself to permissions again, unable to delete because of some "unknown error". I've used Unlocker and Lockhunter, both fail to delete it. If I dig into the directories, I can see and delete individual files but the directories themselves I sometimes can't delete. Even if I delete everything out of the directory. Some directories allow me to delete it, some cry it isn't empty, which it is (I've got show hidden files option ticked). I read a previous trick here which said to move it to my C drive and call it Windows.old and run a disk cleanup. The problem is my C drive hasn't enough room to spare since this directory is over 270gb in size. This is what happens when I try to delete the trash-999 directory: Any ideas? For those wondering how I got in this state, here is a totally skippable back story. I installed Windows 10 LTSB version. For whatever reason it did not like to play with my Onedrive directory on another drive. It kept saying all the files were corrupt. At a guess I would say that the Onedrive folder acts as some kind of symbolic link to somewhere. So my solution was to delete the onedrive folder and re-download all my files. I couldn't delete the folder however, similar errors to this. I loaded up a Linux ISO from USB and delete the files. Great. But being as smart as me, I didn't empty the trash after deletion. So when I rebooted I had this big fat trash directory. Even booting back into Linux didn't work as the errors were similar. Unknown errors, couldn't find files etc. I just want to reclaim my HD space back and I am lost on how I force a deletion of a directory. Surely there is a way to just nuke it? Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/ Share on other sites More sharing options...
Jim K Global Moderator Posted June 1, 2018 Global Moderator Share Posted June 1, 2018 Does this thread help any? Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277394 Share on other sites More sharing options...
Brandon H Supervisor Posted June 1, 2018 Supervisor Share Posted June 1, 2018 whenever i've run across a broken directory like that I just boot into a linux live cd/usb and delete the folder from there since linux just ignores the occasionally broken permission system of NTFS goretsky 1 Share Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277478 Share on other sites More sharing options...
»X« Posted June 1, 2018 Author Share Posted June 1, 2018 3 hours ago, Jim K said: Does this thread help any? I tried that thread first. Tried everything in it, still no dice. 21 minutes ago, Brandon H said: whenever i've run across a broken directory like that I just boot into a linux live cd/usb and delete the folder from there since linux just ignores the occasionally broken permission system of NTFS As I mentioned, even booting into a live CD doesn't allow me to delete as it (can't show you the exact errors) brings up messages along the lines or unable to access files. Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277498 Share on other sites More sharing options...
Brandon H Supervisor Posted June 1, 2018 Supervisor Share Posted June 1, 2018 7 minutes ago, »X« said: I tried that thread first. Tried everything in it, still no dice. As I mentioned, even booting into a live CD doesn't allow me to delete as it (can't show you the exact errors) brings up messages along the lines or unable to access files. even from terminal level? you should be able to ignore the errors and delete the directory with the following command sudo rm -rf (directory path) the -rf is 2 flags, recursive (gets any sub folders), and force (ignores all errors); and running with sudo gives the command max root permission this command should work no matter what, it's basically a hard kill switch command for files when run as root lol. https://ss64.com/bash/rm.html goretsky 1 Share Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277508 Share on other sites More sharing options...
BlueFlame Posted June 1, 2018 Share Posted June 1, 2018 This help to delete a folder i had trouble with http://www.purgeie.com/delinv/ Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277632 Share on other sites More sharing options...
»X« Posted June 1, 2018 Author Share Posted June 1, 2018 (edited) 4 hours ago, Brandon H said: even from terminal level? you should be able to ignore the errors and delete the directory with the following command sudo rm -rf (directory path) the -rf is 2 flags, recursive (gets any sub folders), and force (ignores all errors); and running with sudo gives the command max root permission this command should work no matter what, it's basically a hard kill switch command for files when run as root lol. https://ss64.com/bash/rm.html Seems this directory is cursed. I just tried that in an Ubuntu live USB. I get the following: rm: cannot remove 'files/OU/ESSAYS': Directory not empty Even though everything I am reading is saying -rf should removed everything, empty or not, it's crying because it's not empty. Any other nuke commands you are aware of? Edit: Just to add. Do I need to get someone to remove a curse from this drive? Would a drill through it fix it? The only way it seems I can delete this folder is to format the drive. While in Ubuntu, I tried deleting the folder. If I go into the directory, I can seemingly delete the folders. When I do, I get a new directory appear in the folder called expunged If I delete those folders, then seem to not delete and rename themselves. Those "2"s are each attempt I hit delete. Edited June 1, 2018 by »X« Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277752 Share on other sites More sharing options...
Brandon H Supervisor Posted June 1, 2018 Supervisor Share Posted June 1, 2018 10 minutes ago, »X« said: Seems this directory is cursed. I just tried that in an Ubuntu live USB. I get the following: rm: cannot remove 'files/OU/ESSAYS': Directory not empty Even though everything I am reading is saying -rf should removed everything, empty or not, it's crying because it's not empty. Any other nuke commands you are aware of? that was with using the -rf flags? that's very odd indeed. there's the alternate command meant specifically for folders but there's no force flag on it which is why most recommend rm -r https://ss64.com/bash/rmdir.html if that doesn't work then the entry is likely corrupt in the actual partition table I would have to think. something similar happened to me several years back on an old Compaq, I ended up having to format to get rid of the entry Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277758 Share on other sites More sharing options...
Brandon H Supervisor Posted June 1, 2018 Supervisor Share Posted June 1, 2018 tried a bit of googling and I found a couple things you could try. apparently it's not an unknown issue just requires different methods to fix depending https://askubuntu.com/questions/566474/why-do-i-get-directory-not-empty-when-i-try-to-remove-an-empty-directory a couple things suggested are renaming the directory then run the delete command or move it back to the trash/recycle bin again and empty it ---- on the Windows side you could try command line or powershell as well, opened as admin. https://stackoverflow.com/questions/97875/rm-rf-equivalent-for-windows - has some interesting info you could try Command Prompt: Quote How to delete a folder Open the command prompt by typing “CMD” in the search field in the taskbar and clicking on “Command Prompt”. Navigate to the folder containing the folder to be deleted by using the ‘cd’ command. Type the following command in the command prompt: RD /S /Q C:\Users\HP1\Documents\folder1 RD stands for remove directory. /S causes the deletion of all subfolders and files /Q will not show Y/N confirmation and will delete the files silently Powershell: Remove-Item "targetdirectory" -Recurse -Force goretsky 1 Share Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277822 Share on other sites More sharing options...
»X« Posted June 2, 2018 Author Share Posted June 2, 2018 Thanks. I just tried it and it leads down another rabbit hole. Reparse Points. When I tried to delete the directory, I got this: "ERROR_REPARSE_TAG_MISMATCH: There is a mismatch between the tag specified in the request and the tag present in the reparse point." Onedrive sure did a number on this directory. Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598277918 Share on other sites More sharing options...
goretsky Supervisor Posted June 2, 2018 Supervisor Share Posted June 2, 2018 Hello, Have you run Chkdsk against the volume to verify there is no filesystem corruption? Also, have you tried using TakeOwn to take ownership of the directory and everything inside it? Regards, Aryeh Goretsky Link to comment https://www.neowin.net/forum/topic/1364842-cant-delete-trash-999-folder/#findComment-598278024 Share on other sites More sharing options...
Recommended Posts