Mencari File

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()

Dim tempStr As String, Ret As Long
tempStr = String(MAX_PATH, 0)
Ret = SearchTreeForFile("c:", "calc.exe", tempStr)
If Ret <> 0 Then
MsgBox "Lokasi file di " + Left$(tempStr, _
InStr(1, tempStr, Chr$(0)) - 1)
Else
MsgBox "File tidak ditemukan!"
End If
End Sub

No comments:

Post a Comment