Solved

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

Posted on 2006-06-28
1
222 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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