Saturday, 15 February 2014

string - How to add empty space using batch script? -


Is there a way to loop a text file that will add an AMTT SPACE to each line?

commit.txt

  commit c9bee merge: 7db Author: Tom Date: Fri Mar 13 Author: TIM  

Output .txt

  commit c9bee merge: 7db Author: Tom Date: Fri Mar 13 Author: TIM  

Here is a solution:

 for  / f "delims ="% i (file) @ echo% i  

Note that if you use it in a script, you should double percents (as opposed to interactive use).


No comments:

Post a Comment