Batch file reads in text file and replaces quotes with variables into new file?
- by John
I have customer Pizza lists that i have saved into 5 seperate txt files from my database in this format:
Filename = 25Percent.TXT
"555-1211"
"555-1212"
"555-1223"
... ect
Each list is a phone number in quotes and each list varies in length.
Part 1:
I have two sets of variables that i would like to replace with each quote in the 5 text files.
The two variables would be like:
Var A = < Discount Pizza price for phone number is "
Var B = " 25 %
So i would like to run a batch file that reads each line in the text file and writes into another text file the following, replacing the quotes with the variables:
New Filename = 25Percentfinished.TXT
< Discount Pizza price for phone number is "555-1211" 25 %
< Discount Pizza price for phone number is "555-1212" 25 %
< Discount Pizza price for phone number is "555-1223" 25 %
Then I would repeat for 30percent.txt, then 35percent.txt, 40percent.txt, and then finally 50percent.txt file.
Part II:
I would also like to append the 5 new files together, with the append command?
I am assuming that the SET Var command would also be used?
Not sure what to do here.