My case its because my Unix script generates output filename with question mark.
Ex :1_1231234567_JD010500000010180917?.xml
This "?"  is because of the <CTRL><LF>
So before transfer to server makesure convert to Unix format.
Your script is "cat" any files? Makes that file is in Unix format.
PROBLEM SOLVED.
                
            
        
    
    
        
        
            
            
                n Winscp Go to Options-->Preferences-->Endurance-->Enable transfer resume--> All files Click on OK and then refresh Winscp. The error should not come.
                
            
        
    
    
        
        
            
            
                Hello,
I have also this problem with WinSCP. The 255 limit is not however a limit due to NTFS.
Other software manage the situation and allow writing files with a filename (including path) longer. Example : teracopy with an option in .ini file :
MaxPathLimit=1
    0: Allow to create extra long paths (> 255 characters). 
If you could consider again this issue ...
Best regards,
Frédéric Bernard
                
            
        
    
    
        
        
            
            
                We have one person that cannot open a file from a remote site.  She gets an error message that says it can't create the file in C:\Docs & Settings\user name\...It says, a call to an OS function failed.  It is only this one particular document.  She can open all other documents.  I am able to open the same file from a different computer without any issues.
WinSCP version:  4.1.9 (Build 416)
OS:  Windows XP SP2
Transfer Protocol: SFTP
GUI Interface:  Commander
I will e-mail you a screen shot of the error as well as the log file.