How do I loop through a group of files and replace a key bit of text with another piece of text.
I want to loop through a list of files looking for "MYVARIABLE" text and replace it with a variable I have set in my RoboTask.
WHat is the easiest way to do this.
Find and Replace text in files
Find and Replace text in files
You can do it by following algorithm:
File loop by mask
Text loop on each file
Replace desired text on each line
and write new line into new file
end text loop
rename new file to old name
end file loop
File Loop and Text loop are RoboTask actions, but string replacement you need do in BASIC script.
I think that it is better to do all processing of single file in BASIC.
File loop by mask
Text loop on each file
Replace desired text on each line
and write new line into new file
end text loop
rename new file to old name
end file loop
File Loop and Text loop are RoboTask actions, but string replacement you need do in BASIC script.
I think that it is better to do all processing of single file in BASIC.