We help IT Professionals succeed at work.
Get Started

How to select files in a folder (to get data from), selecting the most updated version based on name of file

Emily Barnes
Emily Barnes asked
on
78 Views
Last Modified: 2018-02-02
I have a code to extract certain data from files in a folder but I would like to select the updated versions of these files (there are ten in total, with newer versions added frequently). The newer versions have higher numbers in the name so for example, the name of one file could be T1_D002 and then T1_D003 would be the new version of the TP1 files in the folder and this would be the case all the way to TP10. I already have a loop going through the folder to select certain files, but it will give all of the versions of the T1-T10's. The T and D parts are not the only characters in the file name. Any help would be wonderful.
Comment
Watch Question
Consulting
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE