Topic "XMLLOG - XSLT File to parse results"

Author Message
SPY

Guest


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
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
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License