Test for file existance in wodFtpDLX - WeOnlyDo Discussion board

Test for file existance in wodFtpDLX (wodSFTP / wodSFTP.NET / wodSFTPdll)

by kaczmar2, Tuesday, March 01, 2005, 17:34 (7206 days ago)

Is there a way to test for file existance in wodFtpDLX? I don't want to use ListNames() and ListItem() methods, since it would take awhile to retreive and parse through the whole directory listing. I noticed that the regular SFTP component has a GetAttributes() method, but I do not see one for wodFtpDLX.

Is there a quick way to check for file exists before I attempt to download a file? If I perform a GetFile() on a fle that does not exist, it writes a 0-byte file to my destination, which I do not want.

Christian

Re: Test for file existance in wodFtpDLX

by wodSupport, Tuesday, March 01, 2005, 19:59 (7206 days ago) @ kaczmar2

Kaczmar,

are you sure it creates zero-sized file locally? I would rather fix this bug if it exists, since finding answer to your question isn't that easy. I think that in FTP protocol there's no convinient way for that. You may try to use RawSend( SIZE filename & VbCrLf) but that's not supported on all servers.

Re: Test for file existance in wodFtpDLX

by wodSupport, Wednesday, March 02, 2005, 02:16 (7206 days ago) @ wodSupport

We have tweaked wodFtpDLX a bit so it doesn't create this file if remote doesn't exist. Please download it again (or request update if you're licensed user).

Hope that helps.

Re: Test for file existance in wodFtpDLX

by kaczmar2, Wednesday, March 02, 2005, 15:31 (7205 days ago) @ wodSupport

Excellent! I have downloaded the new version of the component and verified that it does not create a 0-byte file.

Thank you very much for your prompt assistance.

We have tweaked wodFtpDLX a bit so it doesn't create this file if remote doesn't exist. Please download it again (or request update if you're licensed user).

Hope that helps.