Hi,
I have got a ton of dicom files that I want to mass rename using their properties tags.
My question is, what is the syntax for taking a property tag(such as dcm:SeriesNumber) for every image and using it to rename the images in the directory?
I'm guessing it involves breaking it down to the relevant tag using -identify -verbose and then somehow passing that string over to the filename property?
Really would appreciate the help(using win10 command line).
Using properties to mass rename images
Re: Using properties to mass rename images
Almost got it.
How do I set an underscore in-between dcm:SeriesNumber and dcm:AcquistionNumber?
Code: Select all
convert *.dcm -set filename:f "%[dcm:SeriesNumber]%[dcm:AcquisitionNumber]" "%[filename:f].jpg"
Re: Using properties to mass rename images
Aaand got it.
Code: Select all
convert *.dcm -set filename:f "%[dcm:SeriesNumber]"_"%[dcm:AcquisitionNumber]" "%[filename:f].jpg"
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Using properties to mass rename images
You shouldn't even need to use two sets of quote marks. I haven't tried it, but I'd make a pretty confident guess that this will work...Frogger wrote:How do I set an underscore in-between dcm:SeriesNumber and dcm:AcquistionNumber?
Code: Select all
convert *.dcm -set filename:f "%[dcm:SeriesNumber]_%[dcm:AcquisitionNumber]" "%[filename:f].jpg"
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using properties to mass rename images
If you don't have spaces in the sub-fields, you probably don't needs quotes at all.
snibgo's IM pages: im.snibgo.com