PC Review


Reply
Thread Tools Rate Thread

How check multiple file existance on FTP server?

 
 
Cirene
Guest
Posts: n/a
 
      25th Aug 2008
Using VB.NET (latest version) I want to log onto an FTP server and check for
the existance of 10 files in 3 different directories. I would prefer to do
this over 1 live connection. Anyone have any sample code that does this?

(The code samples that I've seen connects via a FtpWebRequest to a specific
URI (which includes a filename) and just checks if GetFileSize produces an
error which contains 550. I'm not sure if this is the most efficient. Even
if it is, I don't want to have to create a specific URI for each filename,
then reconnect each time over FTP. I would like to have 1 connection, for
efficiencies sake...)

Thanks!


 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      26th Aug 2008
At the end of the day, the DotNet code is just fancied up wrappers for the
baseline FTP calls.

So unless there is a default ftp (nothing to do with dotnet code) for
multiple files, dotnet cannot really help (even with a fancy wrapper).

While this was a pre 2.0 helper library (for 1.1 ftp'ing), you can at least
look at the source code and see some of the "baseline" FTP calls.

http://www.codeproject.com/KB/IP/ftplib.aspx
(I contributed some datetime stuff to it, but JP carried the load on that
one)

...



"Cirene" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Using VB.NET (latest version) I want to log onto an FTP server and check
> for the existance of 10 files in 3 different directories. I would prefer
> to do this over 1 live connection. Anyone have any sample code that does
> this?
>
> (The code samples that I've seen connects via a FtpWebRequest to a
> specific URI (which includes a filename) and just checks if GetFileSize
> produces an error which contains 550. I'm not sure if this is the most
> efficient. Even if it is, I don't want to have to create a specific URI
> for each filename, then reconnect each time over FTP. I would like to
> have 1 connection, for efficiencies sake...)
>
> Thanks!
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check existance of a table in sql server? Dan Microsoft ASP .NET 15 9th Jul 2007 03:33 PM
how to check existance of a table in sql server? Dan Microsoft VB .NET 15 9th Jul 2007 03:33 PM
Check for file existance =?Utf-8?B?Um9u?= Microsoft Access Forms 4 26th Jan 2006 04:41 PM
Can a formula check for existance of a file =?Utf-8?B?QmlnV29vZg==?= Microsoft Excel Worksheet Functions 6 13th Aug 2004 01:16 AM
check Existance of a file on different machine Ajit Microsoft ASP .NET 5 26th Sep 2003 11:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:36 AM.