Solved

VB Script - Need altered a bit

Posted on 2013-01-17
7
257 Views
Last Modified: 2013-02-05
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
Comment
Question by:elwayisgod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 21

Assisted Solution

by:AmazingTech
AmazingTech earned 250 total points
ID: 38788676
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
 

Author Comment

by:elwayisgod
ID: 38789539
Didn't work..  It's one field thus not sure...
0
 
LVL 55

Expert Comment

by:Bill Prew
ID: 38790415
I think I would want to see the script before you changed it, and what the input file looks like.

~bp
0
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 

Author Comment

by:elwayisgod
ID: 38810470
Script just had  '2012', '2013' etc..  for array.  That's only change.
0
 
LVL 55

Accepted Solution

by:
Bill Prew earned 250 total points
ID: 38816034
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
 

Author Comment

by:elwayisgod
ID: 38831169
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
 

Author Closing Comment

by:elwayisgod
ID: 38857514
Splitting points as it's dead question....Sorry.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question