Downloading long file name files
I know that there is some sort of issue with WinSCP downloading long file names from within Powershell as I have seen a number of reports on this. I am using the latest version. The typical error I get is:
Failures : {WinSCP.SessionRemoteException: Can't create file 'c:\Directory\InProcessPC\AB1701090015040110.999'.
System Error. Code: 3.
The system cannot find the path specified}
BUT I can sometimes get this to work.
The following works to pull down the very same sets of files that fail to come down under more complex situations (generating the above error):
$session.GetFiles( $filemaskDown, $localPath, $false ).Check( )
Well it appears to work some/most times. It seems to work until it doesn't?!?! It is like my Powerscript code gets to a level of complexity and BAM starts generating those errors. I am using Powerscript 4 (Win7) and 5 (Win10). Anybody got any ideas?
Is it the name of the file that is the issue or the individual path components? What is the "limiting" issue? I could always temporally rename each server file shorter, download it and then name it back to what it initially was named, correct? Would that get around the issue?
Thoughts? Thanks.
Failures : {WinSCP.SessionRemoteException: Can't create file 'c:\Directory\InProcessPC\AB1701090015040110.999'.
System Error. Code: 3.
The system cannot find the path specified}
BUT I can sometimes get this to work.
The following works to pull down the very same sets of files that fail to come down under more complex situations (generating the above error):
$session.GetFiles( $filemaskDown, $localPath, $false ).Check( )
Well it appears to work some/most times. It seems to work until it doesn't?!?! It is like my Powerscript code gets to a level of complexity and BAM starts generating those errors. I am using Powerscript 4 (Win7) and 5 (Win10). Anybody got any ideas?
Is it the name of the file that is the issue or the individual path components? What is the "limiting" issue? I could always temporally rename each server file shorter, download it and then name it back to what it initially was named, correct? Would that get around the issue?
Thoughts? Thanks.