Please feel free to provide feedback or file bugs here.

Get-ChildItem -LiteralPath doesn't support long path

Get-ChildItem -LiteralPath doesn't support long path, for example:

Get-ChildItem -LiteralPath 'D:\aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjjkkkkkkkkkkllllllllllmmmmmmmmmmnnnnnnnnnnooooooooooppppppppppqqqqqqqqqqrrrrrrrrrrssssssssssttttttttttuuuuuuuuuuvvvvvvvvvvwwwwwwwwwwxxxxxxxxxxyyyyyyyyyyzzzzzzzzzz.txt'

Which path is longer than 260 bytes, even if the file DO exists in that path.

But `Get-ChildItem` WITHOUT `-LiteralPath` works well with that long-path file.


Name Value
---- -----
PSVersion 5.1.17763.134
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.134
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3

3 votes
Sign in
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Victor Woo shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
Password icon
Signed in as (Sign out)

Feedback and Knowledge Base