Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Wait...

I may have found a Powershell script "bug" that was causing this issue. Am still investigating and will post my results either way.
martin

Please attach a log file from GUI showing an upload of file c:\PayConcierge\InProcessPC\CX1609271430050108.999.
Guest

Yes to all. I can see the directory structure in WINSCP GUI and I can transfer those exact files without error. I performed the manual transfers as binary and as ASCII.
martin

Re: Downloading long file name files

Does the local path c:\PayConcierge\InProcessPC exists? Can you browse to it in WinSCP GUI? Can you download the files to that folder in WinSCP GUI? What is a local file system of the path?
JustAsking

Re: Downloading long file name files

martin wrote:

Please attach a full session log file showing the problem (using the latest version of WinSCP).


Here you go...
martin

Re: Downloading long file name files

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
JustAsking

OK, worked around...

Not pretty but managed to code a work-around.

I get a listing of the files on the remote server and one by one:
- I rename each file to a short-name
- download the file to a short directory
- rename the file back (in production the file will be removed but for testing, this is easier)
- move-item the file to its final resting place while renaming it back to its original name (from the server)

It works but... :oops:
JustAsking

Continued...

OK, just tried renaming the file to a 8.3 length, and then downloading and same issue.

Failures : {WinSCP.SessionRemoteException: Can't create file 'c:\TmpDirectory\InProcessPC\working.txt'.
System Error. Code: 3.
The system cannot find the path specified}
IsSuccess : False
JustAsking

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.