Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

SearchFileInDirTree - Searches a file on a directory tree

Total Hit ( 2854)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Click here to copy the following block
<System.Runtime.InteropServices.DllImport("imagehlp.dll")> Shared Function _
  SearchTreeForFile(ByVal rootPath As String, ByVal inputPathName As String, _
  ByVal outputPathBuffer As System.Text.StringBuilder) As Boolean
End Function

' Returns the complete path+name of the filename or a null string if the
' filename hasn't been found. Only the first occurrence of the file is returned.
'
' Example: Debug.WriteLine(SearchFileInDirTree("d:\codearchitects\codebox",
' "codebox.exe"))

Function SearchFileInDirTree(ByVal rootDir As String, ByVal fileName As String) _
  As String
  Dim buffer As New System.Text.StringBuilder(260)
  SearchTreeForFile(rootDir, fileName, buffer)
  Return buffer.ToString()
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.