Error: Temporary file already exists

Started by nms, October 06, 2011, 09:10:21 AM

Previous topic - Next topic

nms

Windows XP SP3, exiftool 8.64

C:\>exiftool -tagsFromFile "w:/%d/%f.%e" -@ nms.args -overwrite_original -r rimages

Got message

Error: Temporary file already exists: rimages/by-date/200x/2003/09/20030914000000-00588.jpg_exiftool_tmp


The file in question left from previous batch (killed by bare hands).

Why this file was not overwritten?

If this file can not be overwriiten is there a way to stop batch processing on this event?

Phil Harvey

ExifTool will not overwrite the temporary file if it already exists (in case you had a real file with this name).  You must delete it by hand.

It should be very difficult to create this file because exiftool will clean up this file if you kill it properly with a sigint.  You must be killing it very brutally to cause it to leave this file around.

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

nms

OK.

How to stop batch processing on this event?

This can be lost in other messages, when one process about 20000 files.

Phil Harvey

You could check the return value and abort on a return value of 1, but this will catch any error.  To catch only this specific error you would need to parse the error text.

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

nms


Phil Harvey

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