I have 1000 frames in a folder. I want to create 10 sub folders and want to store 100 frames in each sub folder.
No products are associated with this question.
mkdir('Frames 1 to 100');
mkdir('Frames 101 to 200');
mkdir('Frames 201 to 300');
mkdir('Frames 301 to 400');
mkdir('Frames 401 to 500');
mkdir('Frames 501 to 600');
mkdir('Frames 601 to 700');
mkdir('Frames 701 to 800');
mkdir('Frames 801 to 900');
mkdir('Frames 901 to 1000');
Thanks for your answer. image names are like Img0001.tif, Img0002.tif ...... upto Img1000.tif and my parent folder directory is C:\Users\aftab\Desktop\New folder
Now can you please explain me how I can write a code using mkdir Thanks a lot for your answer.
mkdir('C:\Users\aftab\Desktop\New folder\Frames 1 to 100');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 101 to 200');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 201 to 300');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 301 to 400');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 401 to 500');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 501 to 600');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 601 to 700');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 701 to 800');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 801 to 900');
mkdir('C:\Users\aftab\Desktop\New folder\Frames 901 to 1000');
You can use sprintf() to build up a string if you want. But since there's only 10 of them, it's easiest just to call mkdir 10 times rather than fool with a look and sprintf, as long as you have a known 1000 frames. If the number of frames could be variable, then construct a loop.
3 Comments
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/80819#comment_157865
I also want to move frames from parent folder to the subfolders
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/80819#comment_157866
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/80819#comment_157869
Thanks for your answer. But I want to move first 100 frames in folder 1, and then second 100 frames in folder 2 and so on. Can you please tell me how I can do that?