Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 28-Dec-09 8:00am
v3

1 solution

Your question was already answered. This repost should be deleted.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900