write Original Raw File Name into jpg, based on jpg filename

Started by Archive, May 12, 2010, 08:54:08 AM

Previous topic - Next topic

Archive

[Originally posted by jorge on 2007-09-20 09:02:46-07]

I'm using the exiftool on Windows.  I want to write into all jpegs converted from RAW files
the original RAW filename.  The jpeg file have the same name as the original RAW files with
different extention.  I do the following in a BAT file.
Code:
for %%f in (*.jpg) do exiftool -RawFile=%%f.NEF -OriginalRawFileName=%%f.NEF -@ do.exiftool %%f
with the following 'do.exiftool' file
Code:
-RawFile<$filename.NEF
-UserComment<RAW by RawShooter essentials 2006 to '$filename'
This result in
Code:
<filename>.jpg.NEF
The expected result would be
Code:
<filename>.NEF
Is it possible to remove the .jpg extention
with the commandline tool?  Or do I need to write a perl script?

cheers,
  jorge

Archive

[Originally posted by exiftool on 2007-09-20 11:54:58-07]

Hi Jorge,

First I would like to point out that a batch file is not necessary.  This
can be accomplished with a single exiftool command:

Code:
exiftool -@ do.exiftool DIR

where DIR is a directory name, and "do.exiftool" contains

Code:
-ext
 jpg
 -RawFile<$basename.NEF
 -OriginalRawFileName<$basename.NEF
 -UserComment<RAW by RawShooter essentials 2006 to '$filename'

Here I have used the BaseName tag which just happens to
be one of the user-defined tags given in the
https://exiftool.org/config.html" target="_blank">sample
ExifTool configuration file.  By installing the sample configuration
file, you will have access to the BaseName tag.

I think this will do what you want.

- Phil

Archive

[Originally posted by jorge on 2007-09-21 12:19:02-07]

Hi Phil,

Thank you very much.  This exactly do what I want.  Very slick software - just need a little perl in the config file.

Now I drag my folder to the exiftool(-@ do.exiftool).exe and it does the job. Excellent.

Is there a way to get a logfile printing all the added information?  I've tried to use -w txt in the do.exiftool file but this has no effect.

-jorge

Archive

[Originally posted by exiftool on 2007-09-21 23:59:38-07]

Hi Jorge,

Currently the only way to log messages like that is to redirect the console
output to a log file.  This is easy from the command line, but I don't
know if it is possible as a Windows shortcut. The command would look
like this:

Code:
exiftool -@ do.exiftool DIR > log.txt

And you could throw in a -v2 option to show exactly what
was written to each file.

- Phil