• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

VB Script - Need altered a bit

I have a vb script that looks for a number in some files.  However now I need it altered to look at column 3 of the files in the 'data_files_to_splice.txt' file.  I updated this file to point to Column 3.  However when I put the string around quotes in the array line, it doesn't return any rows.  I suspect that line needs tweaked?  Attached is the current script.
splice-years.vbs
0
elwayisgod
Asked:
elwayisgod
  • 4
  • 2
2 Solutions
 
AmazingTechCommented:
arrYears = Array( "Style 01 1 13 131 00 00 768780" )

Only puts in 1 array value of "Style 01 1 13 131 00 00 768780"

Perhaps you're looking for

arrYears = Split( "Style 01 1 13 131 00 00 768780", " " )

or

arrYears = Array( "Style", "01", "1", "13", "131", "00", "00", "768780" )

But duplicate 00 wouldn't be necessary.
0
 
elwayisgodAuthor Commented:
Didn't work..  It's one field thus not sure...
0
 
Bill PrewCommented:
I think I would want to see the script before you changed it, and what the input file looks like.

~bp
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
elwayisgodAuthor Commented:
Script just had  '2012', '2013' etc..  for array.  That's only change.
0
 
Bill PrewCommented:
I would like to try and help you with this, but I really don't understand what you are trying to accomplish.  If the arrYears was something like this before:

arrYears = Array( "2012", "2013", "2015" )

then why would changing it to the below relate to changing a column number?

arrYears = Array( "Style 01 1 13 131 00 00 768780" )

And what is in the "data_files_to_splice.txt", as well as some of the files that it references?

~bp
0
 
elwayisgodAuthor Commented:
That new string to look for is in a different column which is ok as the text files controls it.... Nt really sure how to proceed......
0
 
elwayisgodAuthor Commented:
Splitting points as it's dead question....Sorry.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now