2

I have saw this post but I can't figure out anyway.

I have a folder syncronized with OneDrive that when I try to open it, it says the error "The tag present in the reparse point buffer is invalid". If I try to delete it nothing happens. I tried to remove it also with the command rmdir /S and del /R /F but it still fails with the error.

How I can delete that dir?

I tried also the solution mentioned in the other post.

alex3025
  • 71
  • 1
  • 1
  • 11

2 Answers2

4

To solve this, reboot your pc in command prompt mode and type chkdsk /F.

alex3025
  • 71
  • 1
  • 1
  • 11
  • Make sure you run chkdsk /F on the drive letter that is having the problem. Most likely it is c drive but for me I had to run it on my d drive. And you can run chkdsk /F from a command prompt and it will schedule the chkdsk on the next restart (you don't have to reboot into command prompt mode). – Jeff Widmer May 12 '21 at 12:36
  • 1
    Amazed how unstable OneDrive continues to be. I made the cardinal sin of renaming a shortcut added to OneDrive (new feature). Ended up with copy of the folder. However, whilst chkdsk reported some errors, chkdsk /f alone didn't work. Currently trying chkdsk /f /r which of course takes a lot longer – munrobasher Jul 19 '21 at 22:08
  • Doing `chkdsk` on a drive messed up by OneDrive does NOT help in my case. – Jari Turkia Sep 20 '21 at 06:23
4

My own very late answer is similar to that of alex3025. The main change was that I ran two other procedures before running chckdsk.

The folder was on my desktop and this was backed up on OneDrive (i.e. the path was something like *\Onedrive\Desktop\FOLDERtoDELETE)

The entire process was:

  1. Run Deployment Image Servicing and Management (DISM.exe) as an admin
    (win to open the Start menu> > start searching for "dism" > choose "Run as Administrator" from the left pane or right-click and choose this option): RunDISM.exe /Online /Cleanup-image /Restorehealth
    Note: This step may take a few minutes to start and up to 30 minutes to complete. It also got stuck in the middle on the same percentage for about 10 minutes. Don't close the cmd window when you're done.
  2. While still in the same cmd window, Run System File Checker:
    sfc /scannow
    Note: This step may take a few minutes to start and up to 45 minutes to complete.
  3. Run Checkdisk with the Fix and Recover parameters:
    chkdsk /f /r
    Note: You will have to restart the computer, as chkdsk is run before lodaing up the main components of Windows
  4. If the file is also stored on your cloud and sync is enabled, I would suggest that you delete it online sometime prior to the next step. In my case I went to OneDrive online and deleted the bugger.
  5. While pressing SHIFT, delete the file directly to avoid the Recycle Bin.

before that, I had already tried several other methods described here and on Microsoft support and community support pages.

Through Safe Mode with both cmd and Powershell (using the Force argument in both of them, and after having taking ownership of the directory and all the sub-directories. Also through the Command Prompt Startup Mode, executing DEL /F /S/ Q "filename".

Nothing worked.

In the windows GUI I get no errors at all and via cmd and powershell I always got the above error message.