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!

I need help setting up script for Text File

Status
Not open for further replies.

mark5830

Technical User
Dec 13, 2005
39
US
My text file has numerous lines formatted like the below data:

04/04/08 01:00:46 Data Received:1103 0026 7 8 07841480403
04/04/08 02:49:18 Data Received:1105 0055 7 8 07876241609

I need a script that would remove the date time and Data Received: portion of each line of the file then save the file. I will also need this process to be ran every 20 minutes and saved with the same file name everytime. By the way I am new to the world of scripts.


 
So did you read the second part of my reply to you asking this question in the VB forum?

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
PHV I did not know where to start since I am new to scripts thanks that site will get me on the road at least I was hoping someone may have written a similar script or had an example of something close to what I was trying to do.
 
Use the Search button on top of this thread.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
As PHV suggested, you can use the FileSystem Object to read the input file and write the final output file. You can use the ReadLine method to read each line, and parse out the unneeded information.

Some commands that may help with the parsing:
Split()
InStr()
Mid() Left() and Right()
 
Or Replace() and Regular Expression.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top