You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
of course, anno 2017 it's annoying to still have to fight with 260 character limits and that powershell is not using the unicode File API. (Win10 LongPathsEnabled is set to 1). Anyway.
Remove-Item cannot delete a directory which was created by Net-Item, it reports that the path is "too long".
Steps to reproduce
PS C:\temp># Create a Directory
PS C:\temp>$dirname='c:\Temp\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345'
PS C:\temp>New-Item-ItemType Directory -Force -Path $dirname
Directory: C:\Temp
Mode LastWriteTime Length Name
---------------------------
d-----25.05.201700:52123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
PS C:\temp># Delete Directory
PS C:\temp>Remove-Item-Force -Recurse -Path $dirnameRemove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
At line:1 char:1+Remove-Item-Force -Recurse -Path $dirname+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\Temp\1234567...123456789012345:String) [Remove-Item], PathTooLongException
+ FullyQualifiedErrorId : RemoveItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand
Expected behavior
We expect, that PowerShell suports some 1000s characters.
But at least, that Remove-Item can delete Items which were created by New-Item.
Actual behavior
Remove-Item can not delete Items with long path names which were created by New-Item.
Good evening
of course, anno 2017 it's annoying to still have to fight with 260 character limits and that powershell is not using the unicode File API. (Win10 LongPathsEnabled is set to 1). Anyway.
Remove-Item cannot delete a directory which was created by Net-Item, it reports that the path is "too long".
Steps to reproduce
Expected behavior
We expect, that PowerShell suports some 1000s characters.
But at least, that Remove-Item can delete Items which were created by New-Item.
Actual behavior
Remove-Item can not delete Items with long path names which were created by New-Item.
Environment data