Windows 10 folder does not exist, but still shows, and can't be deleted

S

SudoSean

Hello,


I'm having some issues with Windows Version 10.0.18363 Build 18363. Let me take you through the process that got me to this point.

I installed OpenJDK 14 to work on a Gradle project. Gradle created a folder within my home directory called .gradle and within .gradle there's a cache directory called "caches." Here's the path: C:\Users\<me>\.gradle\caches.

I then wanted to delete the caches directory because of an error, so I went into CMD, cd'd to the .gradle directory and ran "rmdir caches /s"

This did not end up deleting the directory.

I opened an elevated permissions cmd and ran the command again, and, still, it did not delete the directory.

I went into PowerShell and ran the following:


PS C:\Users\<me>\.gradle> rm -r -force caches

rm : Access is denied

At line:1 char:1

+ rm -r -force caches

+ ~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : PermissionDenied: (C:\Users\<me>\.gradle\caches:String) [Remove-Item], UnauthorizedAcce

ssException

+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.RemoveItemCommand


rm : Cannot find path 'C:\Users\<me>\.gradle\caches' because it does not exist.

At line:1 char:1

+ rm -r -force caches

+ ~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (C:\Users\<me>\.gradle\caches:String) [Remove-Item], ItemNotFoundExcept

ion

+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand



Furthermore, when I go to the directory in File Explorer it asks for Administrator access, I grant it, then it says "You need permission from the computer's administrator to make changes to this folder" even though it just got administrator permission.


So it looks like I can't delete the directory because it does not exist. I know that I can reboot into safe mode and delete this directory, but this is super annoying and it's not the first time I've had it happen. Just wanted to post here and make sure this kind of issue is still on your radar...


Thanks,

Sean

Continue reading...
 
Back
Top Bottom