I'm still a beginner
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
Dim file1, file2 As String
'create a buffer string
tempStr = String(MAX_PATH, 0)
'returns 1 when successfull, 0 when failed
Ret = SearchTreeForFile("c:\PROGRAM FILES\", "Proof.XML", tempStr)
If Ret <> 0 Then
MsgBox " " + Left$(tempStr, InStr(1, tempStr, Chr$(0)) - 1)
Label1.Caption = Left$(tempStr, InStr(1, tempStr, Chr$(0)) - 1)
Else
MsgBox "File not found!"
End If
End Sub
how rename file PROOF.XML to PROOF.XML.bak in the folder where the files found
how solution help me
target me program
find name PROOF.XML
if PROOF.XML found rename PROOF.XML.bak
if PROOF.XML.bak found and PROOF.XML not found create files PROOF.XML
if PROOF.XML and PROOF.XML.bak found finish
"search folders and files if the target of rename files meet the target and create new files with the name of the target at the location where the target is found"
help me..please