troubleshooting Question

Another splice up of a bunch of files

Avatar of elwayisgod
elwayisgodFlag for United States of America asked on
Visual Basic ClassicVB Script
19 Comments1 Solution454 ViewsLast Modified:
DOS runs out of memory thus was going to see if easy VB way.  Source files are 2GB each.

I have 10 source files that are ! delimited.  The first row is a header row.  The first column in each file is the Year column.  It appears as:  "2012"!"January"!

I need a script that will read every .txt file in the directory and create new files based on the column 1 value.  Each new file will only contain the rows of the same year.  For Example all rows that begin with "2012" will be a new file named the same as the original but prefixed with '2012'.  So if the original file name was 'file.txt' new filename would be '2012file.txt' and so on.  I need the header row in each new file too.

Thanks
ASKER CERTIFIED SOLUTION
aikimark
Get vaccinated; Social distance; Wear a mask
Join our community to see this answer!
Unlock 1 Answer and 19 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros