Parsing a Text file to output to another

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Abstract
Posts: 1
Joined: 16 Dec 2015 04:01

Parsing a Text file to output to another

#1 Post by Abstract » 16 Dec 2015 04:10

Hello

I am very new to this and am either have the worst google searching skills or what I am trying to do is not possible.

I have 2 log files, I would like to write a simple batch script that searches the files (Parses ?) for 5 specific times, these times will "always" be located on the same line in the same position. From there I would like to have those 5 times (note they are already in the 00:00 format in the logs) written to another txt file preferably with a title maybe the output file would look something like this:

Log 1
------------
Time 1 Desc: 00:00
Time 2 Desc: 00:00
Time 3 Desc: 00:00
Time 4 Desc: 00:00
Time 5 Desc: 00:00

Log 2
------------
Time 1 Desc: 00:00
Time 2 Desc: 00:00
Time 3 Desc: 00:00
Time 4 Desc: 00:00
Time 5 Desc: 00:00

Is there anywhere I can start that would be helpful to my need? Good tutorials or references? I see allot about "/f" but is appears to be used with so many conditions almost like a for loop in Java and I understand almost none of this, if not is there a good search term i should be using that would better describe what I am trying to achieve?

Thanks for your consideration.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Parsing a Text file to output to another

#2 Post by Squashman » 16 Dec 2015 07:34

You have not specified what the input file look like.

Post Reply