opening different folders with different name and read CSV files
Show older comments
Hi, I want to open different folders with Matlab and then open different CSV files in each folder and read some specific sheets and columns. I can read the files from specific columns or sheet; however, my problem is that I cannot open different folders.
- The first problem I have is that the files' name are in this form: F21802010055 or F21802010058 so they are not in row.
- Also, each folder may have a different number of CSV files. For example folder F21802010055 has two CSV files with the names of F21802010055-201801-21_00-17 and F21802010055-201801-22_00-12 and folder F21802010058 has one csv file with the name of *F21802010058-201801-21_00-17*Can you please advise what would be the best approach to open these files?
Accepted Answer
More Answers (1)
Roozbeh Yousefnejad
on 28 May 2018
2 Comments
Roozbeh Yousefnejad
on 28 May 2018
Ameer Hamza
on 29 May 2018
Yes. You can get this by skipping last 4 characters from the filename
filename(1:end-4)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!