<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thanks Fredric.</p>
<p>Your way <br>
</p>
<p>%exiv2FullPath% -pp -q "%i" >> results.txt </p>
<p>looks correct—as of course it is, <br>
but on Windows 10 only yields:</p>
<p>Preview 1: image/jpeg, 320x240 pixels, 13855 bytes<br>
Preview 1: image/jpeg, 320x240 pixels, 13235 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes<br>
Preview 1: image/jpeg, 176x128 pixels, 40576 bytes</p>
<p>When I use:</p>
<p>del results.txt & for /r %i in (*.jpg *.jpeg *.png *.crw
*.dng) do %exiv2FullPath% "%i" -pp -q >> results.txt</p>
<p>It is of course ignoring my incorrectly placed
options/switches(?) -pp -q – and so instead I get the full
results set, as if for just: <br>
%exiv2FullPath% "%i"<br>
—like:</p>
<p>File name : E:\Digikam\images\Phone\2022
Apr\OpenCamera\IMG_20201011_191442.jpg<br>
File size : 2547402 Bytes<br>
MIME type : image/jpeg<br>
Image size : 4096 x 3072<br>
Thumbnail : image/jpeg, 13855 Bytes<br>
Camera make : motorola<br>
Camera model : moto g(7) power<br>
Image timestamp : 2020:10:11 19:14:42<br>
File number : <br>
Exposure time : 1/33 s<br>
Aperture : F2<br>
Exposure bias : <br>
Flash : No, auto<br>
Flash bias : <br>
Focal length : 3.9 mm<br>
Subject distance: <br>
ISO speed : 155<br>
Exposure mode : <br>
Metering mode : Center weighted average<br>
Macro mode : <br>
Image quality : <br>
White balance : Auto<br>
Copyright : <br>
Exif comment : <br>
<br>
etc ...<br>
</p>
<p>... Which is what I thought we needed :-) <br>
and so why wasn’t aware my placement of the switches/options was
incorrect.<br>
</p>
<p>I have some self corrupted .jpg(s) in my directory tree, <br>
but I am not seeing them in the above list of the style of:<br>
%exiv2FullPath% -pp -q "%i" >> results.txt <br>
</p>
<p>Preview 1: image/jpeg, 320x240 pixels, 13855 bytes<br>
... etc</p>
<p>— And that alos isn't showing me the file path/names of any of
them.<br>
</p>
<p>Paul<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 14/04/2023 10:59 pm, frederic chaume
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:6441faa8-20c4-c58e-1564-83d9d1b64114@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hi Paul<br>
<br>
1st feedback, <br>
syntax of command should be <br>
%exiv2FullPath% -pp -q "%i" >> results.txt <br>
<br>
and seems the >> doens't catch the exception, <br>
<br>
the exception was missing in the result.txt, but really exist<br>
<br>
D:\images\test> %exiv2FullPath% -pp -q
2023-02-28\P2280067_DxO-corrupted.jpg<br>
Exiv2 exception in print action for file
2023-02-28\P2280067_DxO-corrupted.jpg:<br>
2023-02-28\P2280067_DxO-corrupted.jpg: The file contains data of
an unknown image type<br>
<br>
regards<br>
Frederic<br>
<br>
<br>
<div class="moz-cite-prefix">Le 14/04/2023 à 12:07, frederic
chaume a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:7755726e-37df-18f3-d32e-9d49532a8649@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
Hi Paul<br>
<br>
thanks a lot, that will be very useful, I will test it next week<br>
<br>
Fyi , I got the options from <a class="moz-txt-link-freetext"
href="https://exiv2.org/manpage.html" moz-do-not-send="true">https://exiv2.org/manpage.html</a><br>
<br>
regards<br>
frederic<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 14/04/2023 à 05:54, Paul Norman
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:babc0c4d-a534-aefa-7e75-34770950ba0e@paulanorman.info">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Hi Bob,</p>
<p>Yes file names passed in that way can have unknown things
happening behind the scenes :-)</p>
<p>PowerShell can help here, but Dos can still do it
effectively and quickly, as you are working in it, here are
some dos shell command lines you could try executing. <br>
(If you find this working, it could be converted into a
batch file, once any other needed modifications have been
worked out later. Note that %-s would need to be changed to
%% in a .bat batch file.)</p>
<p>I downloaded a working copy of from exiv2 from<br>
<a class="moz-txt-link-freetext"
href="https://exiv2.org/download.html#license"
moz-do-not-send="true">https://exiv2.org/download.html#license</a></p>
<p>Looks like you got your option commands from(?):<br>
<a class="moz-txt-link-freetext"
href="https://exiv2.org/sample.html"
moz-do-not-send="true">https://exiv2.org/sample.html</a></p>
<p>Locally, open a dos prompt up at the top of the directory
tree you want to explore. <br>
If all you can see is PowerShell, then when that opens type
:-<br>
</p>
<p> cmd <Enter></p>
<p>Again, make sure you are in the top of the directory tree
you want to explore.<br>
</p>
<p>The overall system PATH does not appear to need alteration,
as exiv2.exe when called directly, appears to find all that
it needs locally. <br>
So first set your exiv2.exe file's full location, change the
path to fit your setup, using quotes especially if you have
any spaces in your .exe directory path. :-<br>
</p>
<p>set
exiv2FullPath="G:\utils\exiv2-0.27.6-2019msvc64\bin\exiv2.exe"</p>
<p>And alter the below to your situation (change the *.exts to
whatever you need, fewer or more, leaving a space between
them):<br>
</p>
<p>Then execute each of these lines one after the other :-</p>
<p>del results.txt & for /r %i in (*.jpg *.jpeg *.png
*.crw *.dng) do %exiv2FullPath% "%i" -pp -q >>
results.txt <br>
</p>
<p>find ": 0 x 0" results.txt > possible_corrupt.txt <br>
</p>
<p>notepad results.txt & notepad possible_corrupt.txt</p>
<p><-- Try the above first, but if necessary, in the second
command line above, change ": 0 x 0" to whatever is
signifying your corrupt file(s) as shown in the file:
results.txt. Copy and paste the needed text out of
results.txt between the "quote marks" as I suspect otherwise
invisible tabs U+0009 could be being used.</p>
<p>Close the notepads: for results.txt and poss_corrupt.txt -
when you want to run the command again over the same
directory tree.<br>
</p>
<p>At worst you can scan though the file: results.txt
manually in notepad. <br>
</p>
<p>N.B. <br>
Just note that the file: results.txt will get overwritten
each time you run the main command, so copy or rename it
first if you want to keep it :-)<br>
</p>
<p>Hope that this will help you,</p>
<p>Kindest regards,<br>
Paul<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 14/04/2023 2:16 am, <a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:plowmail2010@gmail.com"
moz-do-not-send="true">plowmail2010@gmail.com</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:bbc8c533-9fb4-2f50-ba69-bd151b4651d4@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p><font face="Times New Roman, Times, serif">Using Windows
7.</font></p>
<p><font face="Times New Roman, Times, serif">I could not
get wildcards to work in exiv2.<br>
The manual says "$ exiv2 *.jpg </font><font
face="Times New Roman, Times, serif">Prints a summary of
the Exif information for all JPEG files in the
directory."<br>
But that gives me "*.jpg: Failed to open the file".</font></p>
<p><font face="Times New Roman, Times, serif">Also, while
fiddling with this, the length of exiv2.exe went to 0.
Maybe the program got tired of my fiddling, or my
computer is about to explode.</font></p>
<p><font face="Times New Roman, Times, serif">Bob</font></p>
<p><font face="Times New Roman, Times, serif"><br>
</font></p>
<div class="moz-cite-prefix"><font face="Times New Roman,
Times, serif">On 4/13/2023 7:02 AM, frederic chaume
wrote:<br>
</font></div>
<blockquote type="cite"
cite="mid:676c0dde-8ec7-5495-5640-3c4c17a1d520@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<font face="Times New Roman, Times, serif"> Hi All<br>
</font> <font face="Times New Roman, Times, serif"><br>
I found an option using exiv2 under windows<br>
</font> <font face="Times New Roman, Times, serif"><br>
>bin\exiv2.exe -pp -q P2280067_DxO-corrupted.jpg<br>
Exiv2 exception in print action for file
P2280067_DxO-corrupted.jpg:<br>
P2280067_DxO-corrupted.jpg: The file contains data of an
unknown image type<br>
</font> <font face="Times New Roman, Times, serif"><br>
>bin\exiv2.exe -pp -q P2280067_DxO.jpg<br>
Preview 1: image/jpeg, 317x237 pixels, 17356 bytes<br>
</font> <font face="Times New Roman, Times, serif"><br>
>bin\exiv2.exe -pp -q .\P2280067.ORF<br>
Preview 1: image/jpeg, 160x120 pixels, 9080 bytes<br>
Preview 2: image/jpeg, 3200x2400 pixels, 1060974 bytes<br>
</font> <font face="Times New Roman, Times, serif"><br>
I think that could be a good solution to find corrupted
jpeg. Based on this I have some thought<br>
- as exiv2 is native with Digikam, I guess such error
could be visible? <b>Is there some "debug level" or
some logs somewhere that could report such errors ?</b><br>
- I'm not expert on coding so don't know how to
translate such command to a recursive search on a set of
folders?<br>
- seems to apply to raw also , but I don't have
corrupted raw to perform the test<br>
</font> <font face="Times New Roman, Times, serif"><br>
thanks to share your feedbacks and may be other option<br>
</font> <font face="Times New Roman, Times, serif"><br>
Frederic<br>
</font> <font face="Times New Roman, Times, serif"><br>
</font> <font face="Times New Roman, Times, serif"><br>
</font> </blockquote>
</blockquote>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
</body>
</html>