Delete image-description "OLYMPUS DIGITAL CAMERA" in all images on a device

Started by ernst.w, October 17, 2018, 12:13:07 PM

Previous topic - Next topic

ernst.w

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.
Kind regards
Ernst

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ernst.w

Mighty tool indeed! And very very quick reply!

Thank you very much for the command line. I will try tomorrow and give a feedback.
Kind regards
Ernst

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ernst.w

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.
Kind regards
Ernst

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ernst.w

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.
Kind regards
Ernst

ernst.w

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.
Kind regards
Ernst

ernst.w

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...
Kind regards
Ernst

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ernst.w

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! :)
Kind regards
Ernst

ernst.w

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.
Kind regards
Ernst

Phil Harvey

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 (2015), and here (2016), and here (2018).

This same problem is addressed in this stackoverflow post, which mentions that the command-line parsing is different for internal commands, which is why it worked for "dir" .
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).