Long file name read

Hi all,
I have 100 files naming e.g: 20120926092230TC.txt[description of the file: 20120926: Year-Month-Date,092230: changes for file to file and TC is fixed. Every file start with 2012..what I want to do is to use 2012 as a identifier and load all files associated with 2012. How can I do this?
/MJ

답변 (1개)

José-Luis
José-Luis 2012년 10월 5일

0 개 추천

Assuming the files are in the current directory:
your_files = dir('2012*.txt');
But otherwise you could always give the complete path:
your_files = dir('/path/to/files/2012*.txt');

카테고리

도움말 센터File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

MJ
2012년 10월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by