I want to create sub folders

I have 1000 frames in a folder. I want to create 10 sub folders and want to store 100 frames in each sub folder.

댓글 수: 3

Md
Md 2013년 7월 2일
I also want to move frames from parent folder to the subfolders
doc copyfile
Md
Md 2013년 7월 2일
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?

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

 채택된 답변

Image Analyst
Image Analyst 2013년 7월 1일

0 개 추천

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');

댓글 수: 5

Md
Md 2013년 7월 1일
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.
Md
Md 2013년 7월 2일
Thank you again for your answer. I also want to move the frames. I have 1000 frames. Now first 100 frames should move to the folder 'Frames 1 to 100' , second 100 frames should move to the folder 'Frames 101 to 200'. Can you please tell me how I can do this part?
Md
Md 2013년 7월 2일
I am trying to do this to move file. movefile('C:\Users\aftab\Desktop\New folder\ImgA001764.tif','C:\Users\aftab\Desktop\New folder\Frames 1 to 100') but how I can do this for 100 frames.

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

추가 답변 (1개)

카테고리

도움말 센터File Exchange에서 Test and Measurement에 대해 자세히 알아보기

태그

질문:

Md
2013년 7월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by