Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read input from txt file and concatenate two strings 1

Status
Not open for further replies.

theavayaguy

Technical User
Nov 18, 2006
10
US
I have this file:

---------- REPORT_DISP_CAP__12-22-2006.TXT
12/22/2006 10:10 AM - Data Export
12/22/2006 10:38 AM - Data Export
12/22/2006 11:08 AM - Data Export
12/22/2006 11:38 AM - Data Export
12/22/2006 0:08 PM - Data Export
12/22/2006 0:38 PM - Data Export

---------- REPORT_DISP_CAP__12-22-2006.TXT

Logged-In ACD Agents: 908 892 1800
Logged-In ACD Agents: 943 857 1800
Logged-In ACD Agents: 943 857 1800
Logged-In ACD Agents: 988 812 1800
Logged-In ACD Agents: 914 886 1800
Logged-In ACD Agents: 985 815 1800

The first date line matches with the first "logged-in..." line. And so on down the file.

I want to get both values which related to each other on the same line, into a new file. e.g.

12/22/2006 10:10 AM Logged-In ACD Agents 908 892 1800

Apply this to the entire file.

Can this be done with a dos batch file?

Thanks!
 
No, DOS batch files don't have the capacity to read and parse files like that. You could do this with either VBScript or JScript using Windows Scripting Host that are built into Windows (which means they're free), though. VBScript is the more popular scripting language of the two, and I'm sure you could find tutorials to teach you how to do this with a Google search.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top