extracting files from multiple directories

조회 수: 4 (최근 30일)
Camilla Santicoli
Camilla Santicoli 2015년 5월 8일
댓글: Image Analyst 2015년 5월 9일
Hello everybody! I have a simple problem to solve: I have 100 folders and each folder contains around 2000 files, called v1,v2,v3...and the names are the same for every folder. How can I extract specific files (e.g v2-v10) in every folder and organize them such that all the v1 are in one new folder and the v2 in a second folder? Thank you
  댓글 수: 8
Camilla Santicoli
Camilla Santicoli 2015년 5월 9일
ok perfect. thank you very much
Image Analyst
Image Analyst 2015년 5월 9일
If that worked, maybe you could vote for my answer or mark it "Accepted".

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

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 9일
You can use the outline in that to loop over directories. And then inside any one directory you can match the file names to find the ones of interest and handling them.
You might be interested in this file finding File Exchange contribution

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 5월 9일
See my attached demo where I recurse into all subfolders of a folder and list the files. You could then do anything you want with each file. It will be easy for you to adapt this to your specific folder names.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by