Solved

VB Script - Need altered a bit

Posted on 2013-01-17
7
255 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 54

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

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

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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