Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Batch file to open existing file and output it in another format

$
0
0

Hello... I have a text file which is in this format:

#Time; SampleNum; SampleId; Moisture; Solids; Weight; Water; Amplitude; T2; FreqDiff
23-06-2014 07:28:01; 2655; trial; 58.0; 42.0; 242.4; 140.7; 1581.7; 1579.0; -25.1

I would like to run a batch file to open this txt (Mr.Result.txt) file and output a new file(Mr.Result_Output.txt) in this format:(no space between the SampleNum and SampleID... could not remove it when pasting)

Time=23-06-2014 07:28:01
SampleNum=2655

SampleId=trial
Moisture=58.0
Solids=42.0
Weight=242.4
Water=140.7
Amplitude=1581.7
T2=1579.0
FreqDiff=-25.1

I use this format to process the file to a SQL table. But am having difficulty with Batch file code. 

Thanks in advance for your help.

Phoebe


~pt~


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>