Blocking and ListDir or ListNames (wodSFTP / wodSFTP.NET / wodSFTPdll)
by nhird, Thursday, June 08, 2006, 15:23 (6743 days ago)
If i set blocking to true am i unable to use the features of the FtpDLX? I wont be able to get a directory listing of files using ListDir or ListNames, use GetFiles or Delete Files?
Thanks
Re: Blocking and ListDir or ListNames
by wodAlan, Thursday, June 08, 2006, 15:37 (6743 days ago) @ nhird
Nhird,
No, you still can use all Methods, but if Blocking Property = True events are still fired, you can just ignore them and check if error occurred during method execution.
More help you can find here:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~Blocking.html
You can also try sample which comes with installation package (1. Simple), that sample can demonstrate to you all about Blocking Property.
Hope I helped.
Regards,
Alan
Re: Blocking and ListDir or ListNames
by nhird, Thursday, June 08, 2006, 16:46 (6743 days ago) @ wodAlan
Ok, i am able to use the loop event. Now i run into the problem of it skipping the last file. I have 5 files in a directory and i only shows 4. If i add one more it will now show 5 but there is 6 in the directory.
1.txt
2.txt
3.txt
4.txt
5.txt
It will only see the first 4.
Re: Blocking and ListDir or ListNames
by wodAlan, Thursday, June 08, 2006, 17:02 (6743 days ago) @ nhird
Nhird,
I just tested this with latest version of wodFtpDLX ActiveX Compoenent and works fine.
So, you did something like this, for example:
[code]
Private Sub Ftp1_ListItems(ByVal FileInfo As String)
Debug.Print FileInfo
End Sub
[/code]
And you're unable to see all files on server? Thats strange, this should work.
What version of wodFtpDLX you have?
Latest version is 2.5.8.247, so if you have some older please request update from here:
http://www.weonlydo.com/index.asp?update=1
I'm asking this because this can be some older problem which is already fixed.
Regards,
Alan
Re: Blocking and ListDir or ListNames
by nhird, Thursday, June 08, 2006, 17:25 (6743 days ago) @ wodAlan
I requested the new version which is version 1.1.0.26. If i use my sftp client i can see all the files i am looking for. If i get the files and look at the remote files, it skips the last one.
[code]
static void FtpLoopItemsEvent(object sender, FtpLoopArgs args)
{
if (args.RemoteFile.EndsWith( .txt ))
{
Console.WriteLine(args.RemoteFile);
}
}
[/code]
Re: Blocking and ListDir or ListNames
by wodAlan, Thursday, June 08, 2006, 18:04 (6743 days ago) @ nhird
Hi,
I tested with code similarly like yours and works, again. Please help me to duplicate this, so can I ask few questions?
1.How can I duplicate this?
2.What type of server you have, vendor/type/name?
3.What protocol did you used?
Sorry for all questions but this can help me to duplicate this problem.
Also, please look at FtpReply Event, and add something like this:
Console.WriteLine (Args.Command + + Args.ReplyText + + Args.ReplyCode)
after that you can paste me here everything what returns.
Maybe after that we can try to establish connection with our server and maybe you can try it there.
Regards,
Alan
Re: Blocking and ListDir or ListNames
by wodDrazen, Thursday, June 08, 2006, 18:47 (6743 days ago) @ wodAlan
Hi,
Can you please also check that you are really using last version of wodFtpDLX.NET.
You can check this by calling Version Property.
This is important because maybe you are still using old version of wodFtpDLX.NET despite you told us that you install latest (1.1.0.26.) version.
I'm asking this because this is known bug that is fixed.
Hope I helped.
Regards,
Drazen
Re: Blocking and ListDir or ListNames
by nhird, Thursday, June 08, 2006, 19:16 (6743 days ago) @ wodDrazen
Ok, first let me apologize. When i recompiled, i imported the wrong verions of the DLL. 1.1.0.26 is now working correctly. My apologies. Thanks for the help! (And the new version)