HEIC file corrupted after running ExitTool

Started by alessandro feroce, March 22, 2025, 07:46:57 AM

Previous topic - Next topic

alessandro feroce

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...

Phil Harvey

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
...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

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
...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

...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
...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 ($).