Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB Script - Need altered a bit

Posted on 2013-01-17
7
Medium Priority
?
270 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 1000 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 58

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
Industry Leaders: 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!

 

Author Comment

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

Accepted Solution

by:
Bill Prew earned 1000 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

Industry Leaders: 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

This article will show, step by step, how to integrate R code into a R Sweave document
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

618 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