Advertisement
Guest User

Untitled

a guest
Feb 18th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Const ForReading = 1
  2. Const ForWriting = 2
  3.  
  4. intRep = 0
  5. strPng = ".png"
  6.  
  7. For count = 0 to 5
  8. intNext = intRep+1
  9.  
  10. Set objFSO = CreateObject("Scripting.FileSystemObject")
  11. Set objFile = objFSO.OpenTextFile("C:\BatTest\FindReplaceIterate\test.xml", ForReading)
  12.  
  13. strText = objFile.ReadAll
  14. objFile.Close
  15. strNewText = Replace(strText, (intRep&".jpg"), (intNext&(".jpg")))
  16.  
  17. Set objFile = objFSO.OpenTextFile("C:\BatTest\FindReplaceIterate\test.xml", ForWriting)
  18. objFile.WriteLine strNewText
  19. objFile.Close
  20. intRep = intRep+1
  21.  
  22.  
  23.  
  24.  
  25.  
  26. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement