Recommended Posts

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).

image.thumb.png.dadd335925a4d3d9a186ed7928bbda25.png

 

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:

 

image.thumb.png.c30f55e6b29adfcadf9770e83d8bb425.png

 

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

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 :)

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.

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

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.

image.thumb.png.7518aaeb456ebc6f54aec7843689b3cd.png

 

 

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.

image.thumb.png.064a36cbf79eb74f46dadb0e4a1c70f5.png

 

 

Those "2"s are each attempt I hit delete.

 

 

Edited by »X«
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 :/

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

 

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.

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Is a fast food restaurant a good metric to compare against?
    • Grand Theft Auto VI pricing revealed alongside Ultimate Edition and pre-loading details by Pulasthi Ariyasinghe Last week, Rockstar revealed Grand Theft Auto VI pre-orders will be starting soon, and just a day ahead of that, now the studio has announced the official pricing for the highly anticipated game. This has been a hotly debated topic among fans and industry veterans for a long time, considering the game is expected to be the biggest entertainment product launch ever. The confirmed pricing for the Grand Theft Auto VI standard edition is $79.99, which Rockstar says gives access to the "single-player experience set in the biggest, most immersive evolution of the series yet." This follows what most of our readers thought would happen with the pricing too. At the same time, a $99.99 Grand Theft Auto VI: Ultimate Edition has been confirmed as well, which lands with "an exclusive collection of premium vehicles, weapons, apparel, and action threaded across all aspects of Jason and Lucia’s story." Pre-ordering will also give fans extra bonuses, including a Vintage Vice City Pack of cosmetic items as well as a free month of GTA+. Head to the official website of the game here to check out all the cosmetic rewards the Ultimate Edition and pre-orders bring. Interestingly, the studio does not mention Grand Theft Auto VI multiplayer at all in today's announcement. Perhaps this will arrive later, following the campaign launch, or the studio is keeping that reveal for a later date. Digital pre-orders for Grand Theft Auto VI will begin on June 25, 2026, at midnight local time across regions for Xbox Series X|S and PlayStation 5. The title is slated to launch on November 19 on those same platforms. Pre-loading for Grand Theft Auto VI will kick off on November 12, giving players a week to get the game ready on their consoles. As for the physical edition, Take-Two has confirmed that this will be available without a disc, with the box only containing a download code inside. This will be purchasable starting November 12, giving players who take this route time to pre-load the title as well.
    • Turbo Pascal was my first real programming experience more than 30 years ago at university. I mostly taught myself from the included examples and help documentation, because the university only taught the basic syntax and philosophy of Pascal, without going deeply into Turbo Pascal’s advanced features. I still remember when I discovered that I could embed assembly language directly into Pascal code, call BIOS functions, manipulate screen memory, use mouse interrupts, and control peripherals from my programs. That opened huge doors for me. Programming back then felt really fun, direct, and close to the machine. What I loved about Pascal was its readability and the almost instant compile time. Turbo Pascal was an amazing environment, but unfortunately Turbo Pascal for Windows 3 did not feel like it fully carried that legacy forward. Later, Delphi got things back on the right track after the messy transition to TP for Windows. Sadly, Delphi suffered from years of uncertainty as it moved from Borland to CodeGear and then to Embarcadero. That instability made many developers lose confidence in it, even though Delphi itself remained a powerful and productive tool. I still work with Delphi from time to time, but I definitely miss the old days of Turbo Pascal.
    • I hope this encodes in to AV1 or AV2 as currently tiktok uses h265 and h264.
  • Recent Achievements

    • One Year In
      OHI Accounting earned a badge
      One Year In
    • First Post
      Almohandis earned a badge
      First Post
    • Rookie
      DaviKar went up a rank
      Rookie
    • Dedicated
      HidekoYamamoto94 earned a badge
      Dedicated
    • One Month Later
      timbobit earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      465
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      120
    4. 4
      Michael Scrip
      81
    5. 5
      Steven P.
      69
  • Tell a friend

    Love Neowin? Tell a friend!