How to get all files with a specific name in a folder?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Stelios Fanourakis
am 27 Apr. 2018
Kommentiert: Stelios Fanourakis
am 29 Apr. 2018
Hi. I have a sequence of images (without extension) named S000009, S0000010, S0000011,.... There is no extension. They are just files but basically they are dicom images without the .dcm extension. I want to gather them altogether and dicomwrite them. Add the .dcm extension to them. Any idea?
Thank you
Akzeptierte Antwort
KSSV
am 27 Apr. 2018
files = dir(); % you are in the folder where files are present
N = length(files) ;
for i = 3:N
oldfile = files(i).name ;
newfile = strcat(oldfile,'.dcm') ;
movefile(oldfile,newfile,'f');
end
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!