Answer the question
In order to leave comments, you need to log in
Do you need to replace text in a large file using vbs or bat how?
Hello, I'm trying to organize a search to replace a piece of text in a large file.
Found the code online
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\bin\win64\client.dll", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "1134", "1401")
Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\bin\win64\client.dll", ForWriting)
objFile.WriteLine strNewText
objFile.Close
Answer the question
In order to leave comments, you need to log in
As an option - use sed - there is also for Windows, a post on habré , a list of commands .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question