Post a reply

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


We will see, if more people ask for this.

Meanwhile – you know what method you are calling, right? So ignore the callbacks while you are calling the ListDirectory.

That's why I requested this feature
Can you at least add one more property to args object?
'from' or so...
so it will be possible to identify the method which log message came from

No there's not.

Is there any way to identify from which method came args parameter?

You can decide what you log in SessionOnOutputDataReceived, cannot you?

sorry. I meant our logs. we use OutputDataReceived

So are you referring to a log file or to the OutputDataReceived?

I've tested this. It doesn't work
It still returns list of items...
WinSCP 5.18.2 beta
session.DebugLogLevel = -1;
session.OutputDataReceived += SessionOnOutputDataReceived;
private void SessionOnOutputDataReceived(object sender, OutputDataReceivedEventArgs args)
    Console.WriteLine("FTP: {0}", args.Data);
return session.ListDirectory(path)

Re: [Feature request] Don't log ListDirectory items

Set "Reduced" logging level:
Session.DebugLogLevel = -1

You need WinSCP 5.18.1 beta for that though:

[Feature request] Don't log ListDirectory items

Hi there

Is there any change to add one more feature to ListDirectory method?
Sometimes we have 50000+ files on the SFTP server
and when we call ListDirectory we receive 50000+ rows in log file
can we have something like this?
ListDirectory(string path, bool writeLog = true)