Topic "Session.ListDirectory error list"

Author Message
as1981
[View user's profile]

Joined: 2015-04-18
Posts: 16
All,

If I want to capture any failures in a putfiles operation I use the following:

Set transferResult = scpsession.PutFiles(parameters)


Log "Failure count " & transferResult.failures.Count

I'm trying to capture the equivalent for session.listdirectory. The only

The only property of the RemoteDirectoryInfo class I can see is remotefileinfocollection.

Can I capture the amount of errors without using 'try/exception' functionality which isn't available in the language I'm using.

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
The Session.ListDirectory reports errors by exception only.
See https://winscp.net/eng/docs/library_session#results

What language are you using?
as1981
[View user's profile]

Joined: 2015-04-18
Posts: 16
Hello,

Thank you for your reply.

Unfortunately I'm still needing to use VB6.

If an exception is created and there is no error handling will it cause the program to stop or will it continue?

If it continues then that's actually OK for me. The program will retry the directory listing every few minutes anyway and if it doesn't get a listing one time but gets one the next it is OK. My main concern is that the program doesn't stop.

Thanks

Andrew
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
See documentation to learn how to handle the exceptions in VB:
https://winscp.net/eng/docs/library_vb#error
as1981
[View user's profile]

Joined: 2015-04-18
Posts: 16
Hello,

Thank you for your help.
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