ExifTool Forum

ExifTool => Newbies => Topic started by: ernst.w on October 17, 2018, 12:13:07 PM

Title: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 17, 2018, 12:13:07 PM
So sorry to bother you with my problem (there is only one but seems to be to heavy for me).

I have a lot of *.ORF, *.JPG, *.TIF and *.PSD files in various folders of one device. "A lot" meens "more than hundredthousand". They all are marked with a image-description "OLYMPUS DIGITAL CAMERA" which i would like to delete in all files. This image-description is automatically shown as image title in WordPress and i cannot accept this.

The problem is: The images are spread about the whole device in some thousend folders. I would like to delete in one pass if possible. And I am firm with working with images (from Capture One, Lightroom, Photoshop) but I am helpless lost in things like command lines...

Somebody told me to ask you for help. Can you help me? And would you?

P.S.: I am using Windows 10 and the stand alone version.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 17, 2018, 12:18:52 PM
Maybe something like this:

exiftool -ext orf -ext jpg -ext tif -ext psd -imagedescription= -if "$imagedescription =~ /^OLYMPUS DIGITAL CAMERA/" -r DIR

(you may want to add -overwrite_original and/or -P to this command)

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 17, 2018, 01:55:48 PM
Mighty tool indeed! And very very quick reply!

Thank you very much for the command line. I will try tomorrow and give a feedback.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 17, 2018, 02:05:59 PM
I should mention that this command will take a while on such a large number of files (maybe a couple of hours?).

You should be able to add -progress: to the command so the progress shows as a percentage in the window title.

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 03:53:42 AM
Thanks again. I just tried this command line
"D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool -ext orf -ext jpg -ext tif -ext psd -ext dng -imagedescription= -if "$imagedescription =~ /^OLYMPUS DIGITAL CAMERA/" -r -overwrite_original -P -progress: "H:\__EXIFTEST\ORF-Test\"
and some unexpected things happened:

1) EXIFTOOL seem to have problems with DIR names including spaces (there are a lot og in my case). Okay, I just try with a "root" folder renamed without any space. We'll see... I have to proove what happened, this will take some time.

2) ALL ORF files give back an error "Warning: [minor] Undersized IFD0 StripByteCounts (9758409 bytes, but expected 20832000) - H:/__EXIFTEST/ORF-Test/20090522-1421-_5225939.ORF". I do not believe that really all of my OLYMPU RAW files are corrupted. ;)

3) The result is:
    8 directories scanned
  224 files failed condition
  845 image files updated
I have to proove how many files are under condition and how many not. Will take a while...

4) BTW: No progress was shown.

If you would have an answer to points 2) and 4) I would be happy.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 07:15:09 AM
Quote from: ernst.w on October 18, 2018, 03:53:42 AM
1) EXIFTOOL seem to have problems with DIR names including spaces (there are a lot og in my case).

You must put quotes around any command-line arguments which contain spaces.

Quote2) ALL ORF files give back an error "Warning: [minor] Undersized IFD0 StripByteCounts (9758409 bytes, but expected 20832000) - H:/__EXIFTEST/ORF-Test/20090522-1421-_5225939.ORF". I do not believe that really all of my OLYMPU RAW files are corrupted. ;)

This is a quirk in the way the Olympus writes ORF files.  I will consider adding an ORF-specific patch to remove this warning.

Quote4) BTW: No progress was shown.

Did you look at the title bar of the window?  Did you include the colon in the -progress: option?  Did you use the cmd.exe shell?  (I don't know if this works in PowerShell.)

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 07:21:22 AM
Thanks again for quick reply! It helps me a lot.

Quote from: Phil Harvey on October 18, 2018, 07:15:09 AM
You must put quotes around any command-line arguments which contain spaces.
I rather thought so. ;)

Quote from: Phil Harvey on October 18, 2018, 07:15:09 AMThis is a quirk in the way the Olympus writes ORF files.  I will consider adding an ORF-specific patch to remove this warning.
Fine. For me this means nearly nothing at the moment.

Quote from: Phil Harvey on October 18, 2018, 07:15:09 AMDid you look at the title bar of the window?  Did you include the colon in the -progress: option?
Yes and yes. But this is a minor problem for me. In the post before you can see the command line as I copied from the command shell.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 07:41:57 AM
Okay, just tested quote around the path:

D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool -ext orf -ext jpg -ext tif -ext psd -ext dng -imagedescription= -if "$imagedescription =~ /^OLYMPUS DIGITAL CAMERA/" -r -overwrite_original -P -progress: "H:\__EXIFTEST\ORF-Test 2\"
The result (and the headline of the windows - progress?) you can find in attached screenshot. Believe me, the folder is full with images and two more folders with images.

Then I have tried to quote only the folder name but failed (as I expected) by finding no folder with this name. Slash and backslash with quotes didn't work either.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 08:21:58 AM
When I read out EXIF (IPTC) from an image I cannot find the field named "image-description" (or similiar). I only found "Camera-ID" in the ORF with the value "OLYMPUS DIGITAL CAMERA". Could it be that this field comes out as "Image Description" in some software products?

If I read out an ORF file and a NEF file there are different fields (and values of course). Now I feel bloody despairing as i cann't even find out if exiftools worked as I/we hoped.

I am a photographer and maybe a graphic designer. I am defenitely not a programming  developer...
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 09:24:44 AM
Hi Ernst,

I can't see anything obvious with your command, so try these commands to see what you get:

1. dir "H:\__EXIFTEST\ORF-Test 2\"

2. D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool "H:\__EXIFTEST\ORF-Test 2\" -filename

3. D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool -ver

... it may take a few iterations, but we'll sort this out.

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 09:32:54 AM
I just went through all my Olympus samples here, and here is a list of all tags with this value:

[IFD0]          Image Description               : OLYMPUS DIGITAL CAMERA
[IPTC]          Caption-Abstract                : OLYMPUS DIGITAL CAMERA
[Olympus]       Camera ID                       : OLYMPUS DIGITAL CAMERA
[Olympus]       Make                            : OLYMPUS DIGITAL CAMERA
[Olympus]       Serial Number                   : OLYMPUS DIGITAL CAMERA
[PictureInfo]   ID                              : OLYMPUS DIGITAL CAMERA
[QuickTime]     Information                     : OLYMPUS DIGITAL CAMERA
[XMP-dc]        Description                     : OLYMPUS DIGITAL CAMERA


Of these, ORF files contain only IFD0:ImageDescription and Olympus:CameraID.  The CameraID is proprietary metadata, and I wouldn't recommend changing this because it may prevent RAW file decodes from recognizing the file, but I would be surprised if any apps displayed this as an "Image Description".

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 11:34:16 AM
Hi Phil,

thanks for your patience!

Quote from: Phil Harvey on October 18, 2018, 09:24:44 AM
1. dir "H:\__EXIFTEST\ORF-Test 2\"
Works.

Quote from: Phil Harvey on October 18, 2018, 09:24:44 AM2. D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool "H:\__EXIFTEST\ORF-Test 2\" -filename
Error file not found. See attached screenshot.

Quote from: Phil Harvey on October 18, 2018, 09:24:44 AM3. D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool -ver
11.14.  See attached screenshot.

Quote from: Phil Harvey on October 18, 2018, 09:24:44 AM... it may take a few iterations, but we'll sort this out.
Thanks for your patience again! :)
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 11:37:43 AM
Quote from: Phil Harvey on October 18, 2018, 09:32:54 AM
I just went through all my Olympus samples here, and here is a list of all tags with this value:

[IFD0]          Image Description               : OLYMPUS DIGITAL CAMERA
[IPTC]          Caption-Abstract                : OLYMPUS DIGITAL CAMERA
[Olympus]       Camera ID                       : OLYMPUS DIGITAL CAMERA
[Olympus]       Make                            : OLYMPUS DIGITAL CAMERA
[Olympus]       Serial Number                   : OLYMPUS DIGITAL CAMERA
[PictureInfo]   ID                              : OLYMPUS DIGITAL CAMERA
[QuickTime]     Information                     : OLYMPUS DIGITAL CAMERA
[XMP-dc]        Description                     : OLYMPUS DIGITAL CAMERA


Of these, ORF files contain only IFD0:ImageDescription and Olympus:CameraID.  The CameraID is proprietary metadata, and I wouldn't recommend changing this because it may prevent RAW file decodes from recognizing the file, but I would be surprised if any apps displayed this as an "Image Description".
It's only image description I want to change. What I am astonished about: I cannot see all this fields or let's say only one of them (Camera ID) when reading a file via exiftool.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 11:40:23 AM
Ah! right.  I don't know why the "dir" command works, but the backslash is escaping the final quotation mark in your ExifTool command line.  Try this (no trailing backslash):

D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool "H:\__EXIFTEST\ORF-Test 2" -filename

If this works, then your other commands should work too without the last backslash.  I seem to remember seeing this before (I should probably document this odd Windows-command-line quirk somewhere...)

- Phil

Edit:  Yes.  We have seen this before here (https://exiftool.org/forum/index.php/topic,6655.0.html) (2015), and here (https://exiftool.org/forum/index.php/topic,7429.0.html) (2016), and here (https://exiftool.org/forum/index.php/topic,9264.0.html) (2018).

This same problem is addressed in this stackoverflow post (https://stackoverflow.com/questions/41607045/why-does-trailing-backslash-followed-by-quote-behave-so-strangely-in-cmd/41607359#41607359), which mentions that the command-line parsing is different for internal commands, which is why it worked for "dir" .
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 11:41:49 AM
Quote from: ernst.w on October 18, 2018, 11:37:43 AM
What I am astonished about: I cannot see all this fields or let's say only one of them (Camera ID) when reading a file via exiftool.

This was across ALL of my Olympus samples... JPG, ORF, AVI, MTS, MOV, MP4, etc.  Some tags will only exist in some of these formats.

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 12:25:49 PM
Hi Phil!

Quote from: Phil Harvey on October 18, 2018, 11:41:49 AM
This was across ALL of my Olympus samples... JPG, ORF, AVI, MTS, MOV, MP4, etc.  Some tags will only exist in some of these formats.
I know.

I have checked an ORF-original where the Image Description field is shown in some software products (Capture One Pro as an example). But the field is not listed by exiftool.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 18, 2018, 12:33:26 PM
Quote from: Phil Harvey on October 18, 2018, 11:40:23 AM
D:\___Install\_TOOLS\_GRAFIK\EXIFTool\exiftool "H:\__EXIFTEST\ORF-Test 2" -filename

Sorry Phil,

there must be another additional mistake. See screenshot. (Maybe I am too tired today to see my fault.)
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 18, 2018, 12:40:47 PM
Great.  ExifTool is seeing the files now.

I meant to use the command I gave exactly, not replace -filename with a file name.  Other than that, it worked fine.  This was only a test command to print the names of processed files.

So the other commands should now work if you drop the trailing backslash.

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 22, 2018, 07:45:06 AM
Quote from: Phil Harvey on October 18, 2018, 12:40:47 PM
Great.  ExifTool is seeing the files now.
Hi Phil,

thanks for answer and sorry about my delay but I was out this weekend. Today there are workmen in the house. I will try to verify tomorrow. I will come back when finished.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 23, 2018, 11:40:17 AM
Hi Phil,

okay. Now I have run a test. Seemed to do something. But there are a lot of new questions:

1) The attached screenshot shows 845 files "done", okay. 224 files failed condition, okay - maybe there are not only 32 xmp-files but NEFs to which do not match condition of "OLYMPUS..." BUT where is the rest? There are 1.560 files in the directories.

2) to check if the image-description was changed (deleted) I tried to use exiftool again. It shows me a lot of EXIF datas but image-description is part of the ITPC datas and not shown. Is this the point why it didn't work (as Capture One shows to me)?
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: StarGeek on October 23, 2018, 12:19:48 PM
ImageDescription is EXIF metadata, not IPTC.  Caption-Abstract would be the IPTC (Legacy) equivalent and Description would be the XMP (IPTC Core) equivalent.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 23, 2018, 01:46:47 PM
Okay. Let's take this as a fact.

But why does exiftool not show the image-description? Not even as an empty field?
And why does Capture One list image-description as an IPTC content?

Anyway, my problem seems not to be solved.
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: Phil Harvey on October 23, 2018, 02:00:17 PM
ExifTool may have different descriptions for the information than other software (see FAQ 3 (https://exiftool.org/faq.html#Q3)).

The newer IPTC Core specification uses XMP format.  ExifTool calls this XMP, but other software may call this IPTC.  ExifTool only calls the older IPTC IIM format "IPTC".

- Phil
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 23, 2018, 02:24:45 PM
Hi Phil,

some irritations, sorry. It seems as if it had worked. Lightroom shows the result I wanted. As I use the German version the field is called "Bildunterschrift" not "Bildbeschreibung". And there it looks like as if it had worked.

I have to check out a little bit mor but have no time free today until weekend. I will come back then - I hope with a great "Hurrah!" ;)
Title: Re: Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device
Post by: ernst.w on October 26, 2018, 06:36:54 AM
Hi Phil,

I will go live today. ;)

All working fine - except the differences in counting what has be done and what not. This I could not really verify. Maybe there remain some images undone (I could not find an example really, only counting differences as mantioned above).

Thanks a lot for help. I wouldn't have got this fixed alone. Thank you, I appreciate!