Move files to another folder.
조회 수: 62 (최근 30일)
이전 댓글 표시
I cropped a few dicom images and placed test on the cropped images (test1.dcm, test2.dcm,....).
Now I want to grab them altogether and put them in a new folder. I am trying this with no luck. Any suggestion?
for indx=3:m listing(indx).name A = dicomread(strcat( 'C:\Echo Images\Stelios\FDB.dcm\' , listing(indx).name)); imshow(A); I3 = imcrop(A, [200.5 59.75 591 480]); %A = imresize(A, [360, 280]); W = dicomwrite(I3, strcat('C:\Echo Images\Stelios\FDB.dcm\test', int2str(indx-2) , '.dcm')); file_to_move = fullfile(newdir,W) movefile(file_to_move,newdir) end
댓글 수: 1
neda esmaeili
2022년 4월 27일
i also wnt to move files of a folder to the other
for i = 5:6
BasePath = ['C:/Users/MacBook/Desktop/proposal/UMA-PROJECT/hospital/',num2str(i),'/'];
Lst = dir(fullfile(BasePath ,'*down'));
cd 'C:/Users/MacBook/Desktop/proposal/UMA-PROJECT/hospital/',num2str(i),'/';
movefile down 1
%movefile C:/Users/MacBook/Desktop/proposal/UMA-PROJECT/hospital/',num2str(i),'/','up 2
end
but it can't find floder of down.
채택된 답변
Ameer Hamza
2018년 4월 30일
After all, files are created. Use
movefile('*.dcm', newdir);
to move all files together.
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!