/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Rewrite textfile vbscript

02/06/2016 794 views

I have a textfile which contains data like this :

Record 1 
Record 2 
Desc 1 
Record 3 
Record 4 
Desc 1 
Desc 2 

I want to rewrite the textfile

Record 1 
Record 2 Desc 1 
Record 3 
Record 4 Desc 1 Desc 2 

how can I accomplish this?

0 Comments   [ + ] Show comments

Comments


All Answers

0
Hi,
if you know which descriptions (Desc n) belong to which Records, then you just read line for line, assigning the Descriptions to the Record(s) in question  (possibly a string array) and then write them out, each (string) array to a single line in your text file.
Answered 02/06/2016 by: Pressanykey
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share