WinSCP creates folder when mainframe library non-existent

Advertisement

user10180
Joined:
Posts:
2

WinSCP creates folder when mainframe library non-existent

I am using WinSCP to ftp files to a Mainframe server, and observed a problem.
When WinSCP copies to an existing library on mainframe, the copying works fine. But when library does not exist on mainframe already, WinSCP copies files as individual files, not under a library.

Example:
USER.A1.A11 exists already and WinSCP has to copy a file (FILE1), it will copy the file correctly under library USER.A1.A11.

But when USER.A2.A22 library does not exist on Mainframe, and WinSCP tries to copy a file (FILE2), it copies it as an individual file like USER.A2.A22.FILE2.

Is there a way this behavior can be fixed?

I am using following options:
WinSCP /ini=nul /console /command 
"open ftp://user:password@ftpserver:21 -passive=on -explicittls" 
"option confirm off" "call SITE site.." 
"CD 'USER1.A2.A22'" 
"put \\location\\* -transfer=ASCII" 
"close" "exit"

Reply with quote

Advertisement

user10180
Joined:
Posts:
2

Re: WinSCP creates folder when mainframe library non-existent

Please see the logs attached. The only notable difference is on Line 10, with an extra dot when library does not exist already on Mainframe server.
  • log when library does not exist.txt (610 Bytes, Private file)
  • log when library exists.txt (609 Bytes, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
37,181
Location:
Prague, Czechia

Re: WinSCP creates folder when mainframe library non-existent

Session log please. Not console output.

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

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. 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.

Reply with quote

Advertisement

You can post new topics in this forum