I'm facing the following problem:
that is Get-ChildItem shows the directory but Remove-Item says that it does not exist !!
I yet try chkdsk, file explorer, trying to rename it,... but I just can't remove that directory
please help.
Gci . -dir|%{Remove-Item -LiteralPath "$($_.FullName)"}
gives:
Remove-Item : Cannot find path 'D:\data\inpibug\ustocks ' because it does not exist.
At line:1 char:14
+ Gci . -dir|%{Remove-Item -LiteralPath "$($_.FullName)"}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\data\inpibug\ustocks :String) [Remove-Item], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

Gci . -dir|%{Remove-Item -LiteralPath "$($_.FullName)"}– LotPings Mar 28 '19 at 19:39