XMLLOG - XSLT File to parse results

Advertisement

SPY
Guest

XMLLOG - XSLT File to parse results

I've no real knowledge of WINSCP but have managed a simple batch file to put 2 files on a server and need a means of confirming the transfer was successful each time it is run.
The XML file looks like this:
<session name="*" start="2014-05-14T14:32:16.944Z">
<upload>
<filename value="c:\sp.txt"/>
<destination value="/home/sp.txt"/>
<result success="true"/>
</upload>
<touch>
<filename value="/home/sp.txt"/>
<modification value="2014-05-09T14:12:03.000Z"/>
<result success="true"/>
</touch>
<upload>
<filename value="c:\sp1.txt"/>
<destination value="/home/sp1.txt"/>
<result success="true"/>
</upload>
<touch>
<filename value="/home/sp1.txt"/>
<modification value="2014-05-09T14:12:03.000Z"/>
<result success="true"/>
</touch>
</session>

Can anyone help with an xslt file so I can allow users to read results easily or is there a better way to confirm transfer success?

Thanks

Reply with quote

Advertisement

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

Re: XMLLOG - XSLT File to parse results

The best (and easiest) method is simply to check WinSCP exit code:
https://winscp.net/eng/docs/faq_script_result

Alternatively, if you want to verify individual transfers, I recommend you use WinSCP .NET assembly.
See this example:
https://winscp.net/eng/docs/library#example
and TransferOperationResult class:
https://winscp.net/eng/docs/library_transferoperationresult

Reply with quote

Advertisement

You can post new topics in this forum