Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Grouping into multiple folders from a single folder

1 visualización (últimos 30 días)
shivasakthi
shivasakthi el 13 de En. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (1)

Geoff Hayes
Geoff Hayes el 13 de En. de 2017
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.

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by