Image-ExifTool - Re: Batch write filename to iptc field ?

Posted on Tue Apr 1 21:32:15 2008 by exiftool in response to 7560 (See the whole thread of 37)
Re: Batch write filename to iptc field ?
Great, I'm glad it finally worked out for you. This morning I fired up my Windows XP system again and tried to make it hide the file extension (the ".exe"), but I couldn't figure out how to do this. Perhaps I missed something, or perhaps this is new in Windows Vista (if you are using this version), but it certainly added to the confusion because when I intentionally change the name to "exiftool(-k).exe.exe", then the -k option no longer works, and the window closes immediately.

But to answer your questions:

1) Hardware and software is not infallible, and there is always a chance that an image becomes corrupted when it is rewritten. This chance is very small, and exiftool has proven to be very reliable, but if your images are important to you then it is always a good idea to keep backups just in case.

2) To remove the ".jpg" from the filename requires the definition of a user-defined tag. But luckily, this is one of the example tags defined in the sample config file which is included in the Perl distribution. So all you have to do is download the full Perl distribution, and copy the included "ExifTool_config" file to a file called ".ExifTool_config" (ie. add a leading "."), and move it to your home directory, or the directory containing exiftool. Once this is installed, you use the "basename" tag instead of the "filename" tag to copy the filename without the extension (ie. "-caption-abstract<basename").

I fear though, that it may be a challenge for you to get this working because you may not be able to easily rename the configuration file to ".ExifTool_config" using the standard technique. I know that Windows XP didn't like me to do this because it doesn't seem to like file names which begin with a ".". So I had to do this at the command line using the rename command. I would have to fire up the XP box again to give you step-by-step instructions on how to do this, but I can't do that until at least tomorrow night, so let me know if you need me to do this for you.

- Phil
Direct Responses: 7563 | Write a response