| 1. |
Solve : adding to a file? |
|
Answer» how do i add a variable to the start of every line in a fileYou would probably have to rewrite the file. To add a colon as the first character in each line of a TEXT file, you can set the variable to the colon and process the file like: how do i add a variable to the start of every line in a file You should already know how to loop over a file using for loop. so just set the variable, eg set var=somevariable then while you are looping over the file, do an echo %var%%%i this will add the variable in front of the line.OK THINK you i did not think a for loop would work i thought that it would just add to the first line |
|