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.

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)


Topic review


Re: Possible bug when generating xml-logfile

Yes, the !P should help.

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: /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?: /log="D:\path\FTP_log\winscp_!S_!P_!Y!M!D_!T.xml" /ini=nul /script=D:\path\winscp_script.txt

//Stig ;-)

Re: Possible bug when generating xml-logfile

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

Possible bug when generating xml-logfile

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

I execute a bat-file: /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 s -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/

This results (sporadically) in this xml-log-result:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="" name="SESSIONNAME" start="2021-05-11T15:33:50.916Z">
    <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" />
    <filename value="/2path_xml/F1537056_20210511-172709_GL.pdf" />
    <modification value="2021-05-11T15:27:10.000Z" />
    <result success="true" />

the 'begin tag' <upload> is missing... it looks like it is replaced with </session>.
the 'end tag' </session> should only exist once...

Please advise!