Author Posts

October 14, 2015 at 2:20 pm

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?


October 14, 2015 at 2:28 pm

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.