MATLAB Answers

multiple folder paths into a loop

조회 수: 2(최근 30일)
Binu
Binu 2020년 2월 17일
댓글: Binu 2020년 2월 18일
Hello friends,
In the attached Test.zip floder, there are txt files at each end folder ( \B1\sss\ttt ). There are only 4 files (B1-B4) attached here, but I have 32 of those. I need to do a same operation to each txt file at all 4 main folders. How can I include those folder paths into a loop to do the same operation to each txt file.
Hope you can help with this.
Thank you
  댓글 수: 4
Binu
Binu 2020년 2월 18일
Thanks Hyeokjin

댓글을 달려면 로그인하십시오.

채택된 답변

Joseph Cheng
Joseph Cheng 2020년 2월 18일
편집: Joseph Cheng 2020년 2월 18일
to add onto what Mr. Roberson has up there:
[a]=dir('B*\sss\ttt\*.txt')
you can continue the search by using the wildcard + extension
  댓글 수: 1
Binu
Binu 2020년 2월 18일
Thanks Joseph

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by