Copy-Item/Get-ChildItem Limitations

Welcome Forums General PowerShell Q&A Copy-Item/Get-ChildItem Limitations

This topic contains 1 reply, has 2 voices, and was last updated by

3 years, 5 months ago.

  • Author
  • #30842

    Points: 112
    Rank: Participant

    Good Evening,

    I have started using robocopy.exe within my powershell scripts to get around the path limitation of Copy-Item and Get-ChildItem. I find it strange that even in Powershell v5 this issue still exists. I realise it is a limitation within Windows (for backward compatibility with older file systems) but I am certain there are ways to get around this – I think I read the win32 API can be used with prefixing the path with '\\?\' to get around this. I just wondered why the devs of Powershell haven't adopted this method – is there a technical reason that anyone is aware of?


  • #30843

    Points: 1
    Rank: Member

    It's not a limitation of Windows per say, it's a limitation of the .Net Framework which PowerShell is built on top of. Currently .Net does not support paths over 256 characters.

The topic ‘Copy-Item/Get-ChildItem Limitations’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort