Link to home
Start Free TrialLog in
Avatar of mbroad02
mbroad02Flag for United States of America

asked on

Consolidate VBS scripts into one

I have 5 VBS script files which are executed to clean up and format a text file.  They each take the input file and check-for/remove things like an extra line, extra quotes, anpersands, etc.  For some reason, each one of these edit checks is done separately in a different VBS script.

I would like to know how I can effectively combine these scripts and their functionality into only one script.

Please advise.  Scripts are attached.
Thank you
replace-ampersands.VBS
replace-ampersands2.VBS
replace-blank-lines.VBS
replace-first-blank-line2.VBS
replace-quotes.VBS
Avatar of kpoineal
kpoineal

It's probably better to leave them as they are. If you really want to "run once", you can have them execute the next script and so forth.
Avatar of Bill Prew
That code looks familiar :-).

I would say they could be easily combined if you always want to perform all edits on the file.  Want me to work up a version?

~bp
Avatar of mbroad02

ASKER

Unfortunately, I can't do that.  I am required to have only 1 script file with all of the functionality I require.  Isn't there a way to have one script that will (1) replace all Ampersands with a comma; (2)  Ampersand and Comma with a comma; (3)  Replace double quote pair with null (4)  Remove blank lines, including if first line is blank.

Please advise
My last reply was to kponiel.  YES by all means if someone can work up a version that does these 4 things (last post) to an input file and writes output, I would be grateful!
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alright!! I will give it a test drive and let you know.

thanks a lot!!
Works great!! Thank you!!
Good job.  What I needed!
Great, glad that helped.

~bp