Hi,
I use -filename to create a set of files indexed by image date/time. I'd like to add an "overwrite existing files" option for this, so the user doesn't have to manually delete the existing cache. Is there an option I can combine with -filename to force overwriting?
Thanks
Andrew
Hi Andrew,
It sounds like you want exiftool to rename a file to replace an existing file. ExifTool will not do this.
- Phil
Dear Phil,
I'm not renaming the original RAW files, but copying and renaming my output files from a first pass with exiftool. If I re-run with different parameters I ideally want to replace what was previously there. I can overwrite the first stage files with -w!, but I really need the second "copy and rename" step to overwrite as well. Is there no way to do this?
Thanks
Andrew
Hi Andrew,
I was just guessing about what you are trying to do. (Renaming files, writing metadata, reading metadata?) It seems I was wrong because you use -w to output text files. If you could provide a command line it would help me to understand.
- Phil
Hi,
The complete command line is:
exiftool -config "C:/Users/Andrew/AppData/Local/Bibble Labs/Bibble 5/PluginData/../PluginData/CAPanasonicRaw.cfg" -pause -U -exififd:iso -exififd:fnumber -exififd:exposurecompensation -exififd:exposuretime -lenstype -imagewidth -imageheight -exififd:datetimeoriginal -PanasonicRaw_0x0119 -DistortionInfo -xmlformat -q --ext .xmp --ext .jpg --ext .jpeg -e -struct -d %Y%m46526280%H%M%S -recurse -w! "C:/Users/Andrew/AppData/Local/Bibble Labs/Bibble 5/PluginData/../CAQuest cache/0.000000.xml" "E:/Pictures/Incoming/Summer 2012 - Incoming" -execute -ext xml "-filename<$DateTimeOriginal.xml" -overwrite_original "C:/Users/Andrew/AppData/Local/Bibble Labs/Bibble 5/PluginData/../CAQuest cache"
The bit before the -execute reads RAW files and writes exif data to intermediate files. -w! works to overwrite these if the user chooses to do that.
The bit after the -execute renames these files based on their date/time, as that's the only key I have within the programming environment to find the right one later. I ideally need this to overwrite existing files as well.
Thanks
Andrew
Hi Andrew,
I think I understand now, thanks.
The fundamental problem is that you don't have any way to use the metadata date/time in the name of the output -w text files. To get around this you are using the exiftool renaming feature to rename these files, but this feature won't overwrite an existing file.
Tricky.
Using the rename feature isn't ideal, but is the only way I can think of doing this. Given the limitation that exiftool won't rename to overwrite an existing file, the only option would be to rename the files into a temporary directory structure, then move them yourself afterwards using standard O/S commands ("move" in Windows? -- does this have a recursive option?) to replace the originals. This adds another step, which again isn't optimal, but I can't think of a better option right now.
- Phil
Thanks.
Is there any way to execute a command to delete the old "renamed" file before I run the "rename" command, i.e. string this as part of the same command line?
If not, I'll have to do something more complicated like you suggest, but it's not really ideal.
Andrew
Hi Andrew,
No, sorry. ExifTool doesn't have any options to run arbitrary O/S commands on files.
- Phil