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

deepthireddyb

Re: Missing filename in failure node

Ok, got you. Thanks!!
martin

Re: Missing filename in failure node

@deepthireddy: Because there's no specific file associated with this error. The synchronization did not even start, because the target directory does not exist.
deepthireddy

Missing filename in failure node

Hi,
I really need help on this.

I could able to log XML from FTPS operation, I could see FileName for all successful transfers but cannot see fileinfo for failed ones.
<failure> node is showing as below, I do not understand why cant I track file names. Please help how to add filename for failed ones.
<failure>
    <message>Error listing directory '/SPD2/Input'.</message>
    <message>Could not retrieve directory listing</message>
    <message>The system cannot find the path specified. </message>
</failure>

Myscript
open ftps://xx:aa@yyyyy -explicitssl -rawsettings 
synchronize remote c:\FTPRoot\SPD\WS\WS_A01 /SPD1/Input
synchronize remote c:\FTPRoot\SPD\WS\WS_A04 /SPD2/Input
synchronize remote c:\FTPRoot\SPD\WS\WS_A06 /SPD3/Input
Chau

Re: Create xml log file using winscpnet assembly

Hi @martin,
Thanks for your help!
I wonder how can I catch a XML logs file to trace status of my files after I do upload/download method?
Can you help me that? I'm coding assembly with C#.
martin

Re: Create xml log file using winscpnet assembly

@Chau: The .NET assembly uses the XML log internally and deletes it when Session.Dispose is called.
Chau

Create xml log file using winscpnet assembly

Hi all,
Firstly, I'm sorry about my bad English.
I'm using winscpnet.dll for my project and when I want to view the XML log of WinSCP , I got this code:
session.XmlLogPath = @"C:\MyProject\MyLog.xml";

The result is nothing, pls help me for that.
I put that code before session.Open, and the version of WinSCP I'm using is 5.5.6.
Mutos

4.3.3 to 5.5.3 : /xmllog works now

Hi all, Just a reply to signal the script now works as expected with /xmllog instead of /log in 5.5.3! Indeed I confirm your saying, @martin: before trying anything else, make sure you use the latest version of WinSCP!
Mutos

Use /log and NOT /xmllog in WinSCP 4.3.3

Hi all,

Thanks for the information !

After reading and re-reading the documentation and the whole topic from the beginning to the end, and tested many ways to get a XML log, from direct command window, VBS, JS and PS, I finally found a working answer.

I finally succeeded with the /log and NOT the /xmllog parameter. In the documentation, it is said that it is deprecated and just maintains compatibility with older version.

As I did get the WinSCP from colleagues, I thought it to be the latest version. But when I checked, I found it to be 4.3.3 and on the site, the latest is 5.5.3. So I suppose the xmllog parameter was introduced after 4.3.3. Now I've downloaded 5.5.3 and as I can only check on a physically remote machine, I'll test it and keep you informed...
martin

Re: XML logging

@Marty: Make sure you are using the latest version of WinSCP.
Marty

XML logging

When I try:
winscp.com /script-my.scr /xmllog=F:\mydir\log.xml

I do not get a log file.

How do you get an XML log???
Guest

In the documentation link it states that you can enable XML logging by adding .xml as the extension of the file you are logging with. Example /log=C:\MyLogFile.xml

Admin edit 2021: While the above still works, the correct way is to use /xmllog parameter.
https://winscp.net/eng/docs/commandline#logging
Walden

Well, maybe the problem is with me, but I could not find this myself, I'd suggest adding some links to the page explaining XML logging, because I have searched it there. thanks for your help!
martin

You can activate it from command-line, see documentation. The page I've posted before links to both ways of activating the logging (GUI and command-line). That's why I've posted it.
Walden

Hi,

The documentation does not help indeed. Maybe you can show the part where it tells HOW to log in XML ? :)

I only found out how to do it, because I was sure there's some kind of hint atleast on the page linked.

I have read the docs very carefully, but there's not a single line explaining that XML scripting has to be activated in the setup in the GUI. There's not a single line in the whole docs on how to activate XML logging.

It's pretty frustrating, as I needed this for scripting and I expected it can be invoked from the commandline, so I did not think for a milisecond that I should use the GUI, or look around in the GUI for such a setting. Naturally one would expect this is only doable from the commndline.


I think you should add something like "XML logging can be activated trough the settings/logging tab etc ". Both to the page you linked, and to the XML page.
martin

Re: how to get WinSCP to log in XML format?

Please read documentation. If that does not help, come back.

Make sure you use the latest version of WinSCP.
Walden

How to get WinSCP to log in XML format?

Hello all,

I've been spent half an hour – an hour of my life to find the answer to this question without any result, neither google, this site, or this forum gave me anything. The only result I got is that I feel really dumb, that I have to ask for this.

Maybe some words in the documentation, an example commandline won't hurt. All there is in the XML part is about the format. Nothing on how to initiate it.

Thanks for your attention.