Possible bug when generating xml-logfile

Advertisement

stigalarsen
Guest

Possible bug when generating xml-logfile

Hi.
Sporadically when winscp.com generates xml-log-file, I get xml-syntax-error...
OS: Windows Server 2016
WinSCP: 5.17.10

I execute a bat-file:
winscp.com /log="D:\path\FTP_log\winscp_!S_!Y!M!D_!T.xml" /ini=nul /script=D:\path\winscp_script.txt
Which uses this script-file:
option batch continue
option confirm off
open sftp://user:pass@host.com:22/ -hostkey="ssh-ed25519=" -timeout=30 -rawsettings FSProtocol=2 ProxyMethod=2 ProxyHost="??.???.??.???" ProxyPort=???? ProxyUsername="user" ProxyPassword="****"
put D:\path\READY_4_TRANSFER\*.pdf ./2path_xml/
put D:\path\READY_4_TRANSFER\*.xml ./2path_xml/
close
exit
This results (sporadically) in this xml-log-result:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="SESSIONNAME" start="2021-05-11T15:33:50.916Z">
</session>
    <filename value="D:\StreamServe\invoice_EDI_copies_PROD\READY_4_TRANSFER\F1537056_20210511-172709_GL.pdf" />
    <destination value="/2path_xml/F1537056_20210511-172709_GL.pdf" />
    <result success="true" />
  </upload>
  <touch>
    <filename value="/2path_xml/F1537056_20210511-172709_GL.pdf" />
    <modification value="2021-05-11T15:27:10.000Z" />
    <result success="true" />
  </touch>
</session>
symptoms:
the 'begin tag' <upload> is missing... it looks like it is replaced with </session>.
the 'end tag' </session> should only exist once...

Please advise!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Possible bug when generating xml-logfile

Aren't you running the multiple WinSCP instances in parallel, which overwrite one another's log file?

Reply with quote

stigalarsen
Guest

Re: Possible bug when generating xml-logfile

Hi again.
that could be the case... I thought the 'log-command' I've used would be enough/unique:
winscp.com /log="D:\path\FTP_log\winscp_!S_!Y!M!D_!T.xml" /ini=nul /script=D:\path\winscp_script.txt
I have now updated the 'log-command' with _!P, would that do the trick?:
winscp.com /log="D:\path\FTP_log\winscp_!S_!P_!Y!M!D_!T.xml" /ini=nul /script=D:\path\winscp_script.txt
//Stig ;-)

Reply with quote

Advertisement

You can post new topics in this forum