Effacer les filtres
Effacer les filtres

multiple folder paths into a loop

2 vues (au cours des 30 derniers jours)
Binu
Binu le 17 Fév 2020
Commenté : Binu le 18 Fév 2020
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 commentaires
Hyeokjin Jho
Hyeokjin Jho le 18 Fév 2020
dir('B*\sss\ttt\*.txt')
Binu
Binu le 18 Fév 2020
Thanks Hyeokjin

Connectez-vous pour commenter.

Réponse acceptée

Joseph Cheng
Joseph Cheng le 18 Fév 2020
Modifié(e) : Joseph Cheng le 18 Fév 2020
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 commentaire
Binu
Binu le 18 Fév 2020
Thanks Joseph

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by