un esempio con l'uso delle api (preso da www.allapi.net):
codice:Private Declare Function SearchTreeForFile Lib "imagehlp" (ByVal RootPath As String, ByVal InputPathName As String, ByVal OutputPathBuffer As String) As Long Private Const MAX_PATH = 260 Private Sub Form_Load() 'KPD-Team 2000 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net Dim tempStr As String, Ret As Long 'create a buffer string tempStr = String(MAX_PATH, 0) 'returns 1 when successfull, 0 when failed Ret = SearchTreeForFile("c:\", "myfile.ext", tempStr) If Ret <> 0 Then MsgBox "Located file at " + Left$(tempStr, InStr(1, tempStr, Chr$(0)) - 1) Else MsgBox "File not found!" End If End Sub![]()

Rispondi quotando