ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: luvnrocs on September 17, 2019, 04:19:15 PM

Title: Failure to overwrite original files
Post by: luvnrocs on September 17, 2019, 04:19:15 PM
We are using bat files to embed metadata in TIFF files. This has been working fine for a few years but all of a sudden late last week, we keep running into issues.

We drop a folder of TIFF files onto the bat file and it starts to process each file. Then it will fail on random images with an error "Failure to rename". We are then left with the original TIFF file (whose security permissions have now changed and will not allow changes) and a tmp file. This issue sometimes starts on the very first image and continues throughout the folder or it appears randomly (5th image, 9th image, 20th image) with no consistency. For example, image 5 failed during a run through. We then copy fresh Tiff files to a new folder and run them using the same bat script and all images fail or other random ones do but image 5 goes through fine. There seems to be no rhyme or reason.

This happens whether the Tiffs and bat files are on a local drive or if they are on a file server. Our IT staff has double checked all permissions and is having trouble narrowing down the cause.

Has anyone else experienced something like this?
Title: Re: Failure to overwrite original files
Post by: StarGeek on September 17, 2019, 06:36:46 PM
In my experience, random failure to rename errors usually mean that some other program has a lock on the file while exiftool is trying to update it.  Was there any system changes a couple weeks ago?  Like maybe indexing programs or constant backups?

But this catches my attention
Quote from: luvnrocs on September 17, 2019, 04:19:15 PM
We are then left with the original TIFF file (whose security permissions have now changed and will not allow changes) and a tmp file.

Are you absolutely sure that the permissions were set to allow changes in the first place?  Because exiftool doesn't change permissions while reading a file.
Title: Re: Failure to overwrite original files
Post by: luvnrocs on September 17, 2019, 06:49:45 PM
I did some more testing. The Tiff files were being copied to a Win File Server from a Mac. It kind of looks like I have to totally disconnect from the Win share on the Mac, otherwise it keeps its claws on the files. I'll have to do more testing to see if this is the cause.

The permissions were set correctly to start with which makes it so weird.