Hi,
is it possible to use the value of a tag as filename when extracting data?
In my case I want to extract the RAW embedded in DNG [-OriginalRawImage] and name it with the original filename [-OriginalRawFileName]
exiftool -b -OriginalRawImage -w temp file.dng
So I woud like to change "temp" to something like "-filename<OriginalRawFileName".
Thanks
This could be done in two steps:
1. exiftool -p "exiftool -b -originalrawimage $directory/$filename -W $directory/$originalrawfilename" -ext dng DIR > out.bat
2. out.bat
(assuming you're running from Windows cmd.exe)
- Phil
Thank you Phil. Your solution works perfect. Exiftool never disappoints.
Here's an addition: to extract the RAW with the current name of the DNG and the extension of OriginalRawFileName I used
exiftool -p "exiftool -b -originalrawimage $directory/$filename -W $directory/${filename;s/(.+?)(\.[^.]*$|$)/$1/}.${originalrawfilename;s/.*\.([^.]*)/$1/}" -ext dng DIR > out.bat
Or is there any other solution?
That looks good.
- Phil