Solved

How to check for the existence of *.tif files in a given directory?

Posted on 2006-06-28
1
213 Views
Last Modified: 2010-04-23
I have to execcute a section of code which demands for the checking of the existence of *.tif files in a directory.

How can I do that?

Thanks
0
Comment
Question by:Reeds
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17001292
Something like...

        Dim path As String = "c:\"
        Dim di As New System.IO.DirectoryInfo(path)
        If di.Exists Then
            If di.GetFiles("*.tif").Length > 0 Then
                ' .tif files present
            Else
                ' NO .tif files present
            End If
        Else
            ' path does not exist...
        End If
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hide Tab Page 3 33
vb.net checkbox 7 41
Get Top Visible Row of Datagridview 6 27
Point to Current Row Ater Refresh Datagridview 3 20
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now