473,473 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How check multiple file existance on FTP server?

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!
Aug 25 '08 #1
1 1385
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" <ci****@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
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!

Aug 26 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
3
by: Raju V.K | last post by:
I am developing a PHP-mysql database. It is noted that when the browser window is refreshed the data is inserted again in the database. unfortunately there is no unique keys that I can use to...
18
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the...
11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
4
by: KathyB | last post by:
Sorry this is a bit of a repost because I wasn't quite accurate in my original. I have an hmtl page with a function to see if there are any input type=text boxes. If so, that means a user did...
4
by: Christopher Nelson | last post by:
I have a multi-page site that I want to be able to resume at the same page if the user leaves and comes back later (say, days later). I'm thinking that I'll set a cookie as each page is displayed...
7
by: Ajit | last post by:
Is there anyway to check for existance of a file on different machine. i.e. we have a data file (text file) thats stored on some other machine as its not to be exposed in case the web server is...
10
by: Academia | last post by:
I'd like to check a string to see that it is a valid file name. Is there a Like pattern or RegEx that can do that. 1) Just the file name with maybe an extension 2)A full path An help...
1
by: soulfly73 | last post by:
hello All, I have an question, I'm very newwhen it comes to ASP.net. I am building an site where I want to check on the existince of an image in an certain directory. No I have some questions...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.