Hi to All.
How I can change the order echo output lines.
Example.
Exa.bat
echo 1 >> c:\test.txt
echo 2 >> c:\test.txt
output from first running at 10:00 AM
test.txt
1
2
output in second running 10:01 AM
test.txt
1 the value from first running
2 the value from first running
**************************
1 the value from second running
2 the value from second running
I want to output in different order the last running will showe up at the first Example:
output from first running at 10:00 AM
test.txt
1 the value from first running
2 the value from first running
Output in second running 10:01 AM
1 the value from second running
2 the value from second running
*************************
1 the value from first running
2 the value from first running
Thank you for advance.
How to change order of echo in output txt.file.
Moderator: DosItHelp
Re: How to change order of echo in output txt.file.
This will add the new data to the top of "original-file.txt"
Code: Select all
@echo off
>>tmp.tmp echo 1
>>tmp.tmp echo 2
type "original-file.txt" >> "tmp.tmp"
move /y "tmp.tmp" "original-file.txt"
Re: How to change order of echo in output txt.file.
foxidrive wrote:This will add the new data to the top of "original-file.txt"Code: Select all
@echo off
>>tmp.tmp echo 1
>>tmp.tmp echo 2
type "original-file.txt" >> "tmp.tmp"
move /y "tmp.tmp" "original-file.txt"
Thank you very much its works perfectly what I need.
