Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Grouping into multiple folders from a single folder
조회 수: 2 (최근 30일)
이전 댓글 표시
I have 119 folders, each containing 46 images in .bmp format. Every two images (all images in perfect order, in all the folders) say image 1 and 2, image 3 and 4, and so on, belong to a particular class. So, I have 23 classes of images in each of these 119 folders. The task is to create 23 folders, corresponding to 23 classes that should contain the respective images ( i.e.) (image 1 and 2 from folder 1, image 1 and 2 from folder 2, ...., image 1 and 2 from folder 119, should go to the first of the 23 folders. Similarly, image 3 and 4 from folder 1, image 3 and 4 from folder 2, ...., image 3 and 4 from folder 119 should go the second of the 23 folder and so on). Kindly help me with the Matlab code for this. Thanks in advance.
댓글 수: 0
답변 (1개)
Geoff Hayes
2017년 1월 13일
shivasakthi - what have you tried so far? This seems like homework so we can only give out hints. Start by writing out the pseudo-code for your algorithm to move the files. You will need to create folders, get a list of the 119 folders, get a list of all files in each folder, and then move each file to a specific folder. See mkdir, dir, movefile, and loop control statements which you can use to perform these tasks.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!