Re: How, exactly DO I use getAttributes to work ou - WeOnlyDo Discussion board

Re: How, exactly DO I use getAttributes to work ou (General questions)

by wodDamir, Tuesday, June 02, 2009, 13:51 (5652 days ago) @ Daniel

Daniel,

Please note that setting RemotePath will never cause an exception. RemotePath doesn't send anything to server, but only sets property.

You need to actually call a method in order to send something to server.

As for errors/exception handling, any of these should work:

[code] Try
sftp1.ListDir( /home/weonlydo/ )
Catch ex As Exception
'An error occured, do something
End Try

Or:

On Error Resume Next
sftp1.ListDir( /home/weonlydo )
If sftp1.LastError.Message <> Nothing Then
'...
End If[/code]

Hope I helped.

regards,
Damba


Complete thread: