ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: nms on October 06, 2011, 09:10:21 AM

Title: Error: Temporary file already exists
Post by: nms on October 06, 2011, 09:10:21 AM
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?
Title: Re: Error: Temporary file already exists
Post by: Phil Harvey on October 06, 2011, 09:15:20 AM
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
Title: Re: Error: Temporary file already exists
Post by: nms on October 06, 2011, 09:27:48 AM
OK.

How to stop batch processing on this event?

This can be lost in other messages, when one process about 20000 files.
Title: Re: Error: Temporary file already exists
Post by: Phil Harvey on October 06, 2011, 09:36:39 AM
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
Title: Re: Error: Temporary file already exists
Post by: nms on October 06, 2011, 09:39:59 AM
One more switch '-stop_on_error'?
Title: Re: Error: Temporary file already exists
Post by: Phil Harvey on October 06, 2011, 09:48:48 AM
I'll think about this.

- Phil