wod SFTP Active X control GetAttributes event does (General questions)
Hi,
I m working with wodsftp active x control using visual basic 6.0, while I m trying to get the size of the file using GetAttrbute property of the control using this statement “woSFTP.GetAttributes RemoteFileLocation” then the Attributes event of the active X control corresponding to this doesn’t call.
Please suggest me how can I get the file size and other attributes of the file
Thanx in advance
Re: wod SFTP Active X control GetAttributes event
Hi Ichopra,
The Attributes Event isn't triggered at all?
Are you using the component in Blocking mode? Can you show me a code snippet of your GetAttributes Call and Perhaps Attributes Event?
Also, what version of wodSFTP are you using?
Regards,
Damba
Re: wod SFTP Active X control GetAttributes event
Hi Damba,
Thax for ur reply the Blocking mode of the control is set to False
and I m using 3.2.1.63 version
I m using it like this :-
Step 1. using this statement and remotefile location
wodsFTP.GetAttributes RemoteFileLocation
Step 2. wait for it's execution
While wodsFTP.State = Executing
DoEvents
Wend
Step 3. Expecting to call this method to further use file attributes
Private Sub InetFTP_Attributes(ByVal Size As Long, ByVal Uid As Long, ByVal Gid As Long, ByVal Permissions As Long, ByVal AccessTime As Date, ByVal ModificationTime As Date)
But it doesn't work Is there any thing that I miss?
Thx & Regards,
Love Chopra
Hi Ichopra,
The Attributes Event isn't triggered at all?
Are you using the component in Blocking mode? Can you show me a code snippet of your GetAttributes Call and Perhaps Attributes Event?
Also, what version of wodSFTP are you using?
Regards,
Damba
Re: wod SFTP Active X control GetAttributes event
Hi,
Can you try the code like this?
----------------------------------------------------------------
sftp1.HostName = your_hostname
sftp1.Login = your_login
sftp1.Password = your_password
sftp1.Connect
End Sub
Private Sub sftp1_Attributes(ByVal Size As Long, ByVal Uid As Long, ByVal Gid As Long, ByVal Permissions As Long, ByVal AccessTime As Date, ByVal ModificationTime As Date)
Debug.Print Size
End Sub
Private Sub sftp1_Connected(ByVal ErrorCode As Integer, ByVal ErrorText As String)
If ErrorCode = 0 Then
sftp1.GetAttributes /home/something/test.txt
Else
Debug.Print ErrorText
End If
End Sub
----------------------------------------------------------------
Does this work?
Regards,
Damba
Re: wod SFTP Active X control GetAttributes event
Hi Ichopra,
Please if you can let us know how it goes, so we can remove our server login information's from public forum.
Regards,
Drazen