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.

Options
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)

Options

Topic review

martin

Re: No delete entry in XML log - bug?

The XML log records operations on remote files only.
What applies to <rm> tag too:
https://winscp.net/eng/docs/logging_xml#rm
Deleting of one (or more) remote file or directory.
GeneSys

No delete entry in XML log - bug?

Hey there,

I'm using WinSCP 5.1.4 on Windows Server 2003 SBS to synchronize my website to my server in order to have a backup.
As it might be that multiple people work on the webspace I'd like to preserve a log of what has changed.

I'm using WinSCP with scripting, the script is as follows:

open mysession@mydomain.com

synchronize -delete -criteria=either -transfer=binary local "C:\www.mydomain.com" "/websites/www.mydomain.com"
close


and I'll call it by use of a batch (.bat) file:

winscp.exe /log=mirror.log /xmllog=mirror.xml /script=mirror-website.script.txt


Everything works as expected (files are synchronized), but in the mirror.xml no delete command is recorded.

So I renamed a file on the server, this is the essential log from mirror.log (I renamed "TEST.rename" to "TEST.2Ren")

[...]

. 2013-02-26 15:36:18.774 Remote file '/websites/www.mydomain.com/TEST.2Ren' [2013-02-26T14:19:43.000Z] [28] is new
[...]
< 2013-02-26 15:36:52.431 Script: 'C:\www.mydomain.com\TEST.rename' deleted
[...]


but the XML log only shows:

<?xml version="1.0" encoding="UTF-8"?>

<session xmlns="http://winscp.net/schema/session/1.0" name="mysession@mydomain.com" start="2013-02-26T14:36:13.883Z">
  <download>
    <filename value="/websites/www.mydomain.com/TEST.2Ren" />
    <destination value="C:\www.mydomain.com\TEST.2Ren" />
    <result success="true" />
  </download>
</session>


but I would expect that there will also be a `rm` tag in the XML log, stating that the file `TEST.rename` was deleted.

In the documentation (https://winscp.net/eng/docs/logging_xml#rm) it states that the rm tag is associated to `synchronize local|both -delete`.
Am I doing something wrong or is this a bug?

Thank you very much for your support.