I have 21 files that are pipe delimited and contain a header row. Each file contains a Year column. However the Year column could be in a different column for each file. I need to splice out, into new files, all the rows where the Year is 2012. New files need to contain the same header row and be named the same except with a prefix of '52WK_' and only contain the rows from original file where the Year was 2012. Other columns in the files might contain 2012 but it could be Units or other data and not in Years column. Thus important we only get where the Years column is 2012. The remaining rows of data that are not Years of 2012 can be prefixed with 'Non_2012_' and same original filename after that. Attached is my file names to look in and which column is they Years.
Want this in DOS Batch if possible. I have another VB one too as I don't know if client prefers DOS or VB so thought I would do both. filenames-and-years-column.xlsx
”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
With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. You'll also be able to connect with highly specified Experts to get personalized solutions to your troubleshooting & research questions. It’s like crowd-sourced consulting.
We can't always guarantee that the perfect solution to your specific problem will be waiting for you. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need.
Our certified Experts are CTOs, CISOs, and Technical Architects who answer questions, write articles, and produce videos on Experts Exchange. 99% of them have full time tech jobs - they volunteer their time to help other people in the technology industry learn and succeed.
We can't guarantee quick solutions - Experts Exchange isn't a help desk. We're a community of IT professionals committed to sharing knowledge. Our experts volunteer their time to help other people in the technology industry learn and succeed.