View Single Post
Old 07-31-2008   #2 (permalink)
sardinian_guy


Vista Home Premium 32bit
 
 

Re: add an empty line to txt file every two rows.

I spent an hour looking for a solution. Now that I posted finally I found it.

$i=1; gc myfile.txt | % {if($i%2 -ne 0) {add-content newfile.txt $_} else {add-content newfile.txt $_,`r};$i++}

Thanks the same. Have a nice day!
My System SpecsSystem Spec