ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: alessandro feroce on March 22, 2025, 07:46:57 AM

Title: HEIC file corrupted after running ExitTool
Post by: alessandro feroce on March 22, 2025, 07:46:57 AM
I ran Exiftool this way..
Pass 1a: move files with EXIF into the proper directory:
exiftool '-directory</media/data/Imagearchive/$datetimeoriginal/$make' -d "%Y/%m/%d" -r  /media/data/Images

Pass 1b: move files with no EXIF:
exiftool '-directory</media/data/Imagearchive/NOEXIF' -r  /media/data/Images

Pass 2: rename the files (with EXIF):
exiftool '-filename<$datetimeoriginal%+c.%e' -d "%Y_%m_%d_%H%M%S" -r /media/data/Imagearchive

And now all my ".heic" photos are corrupted with a grey line..

No problems with ".jpg" or "png" files..

There is a way to fix my files?

Thank you.. I am very desperate cause my backup hard drive was dead after only few seconds I discovered my "heic" photos was damaged...
 Here you can see an example of the "healthy" (sana) and the "corrupted" (corrotta)

Thank you indeed...
Title: Re: HEIC file corrupted after running ExitTool
Post by: Phil Harvey on March 22, 2025, 08:23:56 AM
These commands don't modify the file at all.  In fact, since the source and destination directories seem to be on the same filesystem, they shouldn't even involve a copy operation -- they should only be renaming the files.  Just to be sure, I ran your commands on Sana and everything worked as expected.

The only way I could see this happening is if the filesystem itself is corrupted.

The Corrotta file is well and truly corrupted.  As far as I can tell it contains random data after a certain point.

- Phil
Title: Re: HEIC file corrupted after running ExitTool
Post by: Phil Harvey on March 22, 2025, 09:24:05 AM
BTW, what system are you running, and what ExifTool version?

Also, is this a local-mounted disk or some sort of shared volume or something else?

- Phil
Title: Re: HEIC file corrupted after running ExitTool
Post by: Phil Harvey on March 29, 2025, 06:45:11 AM
...no responses in 7 days. :(

I'm working under the assumption that this was a hard disk problem and that you haven't posted back because your disk crashed and you are busy rebuilding your filesystem.

- Phil