some time ago when I was mostly a widows user I wrote a nice little
batch script that took as an argument a directory path in-which it
expected to find a ./RAW directory containing the *.CRW raw files from
my old canon camera, then it used dcraw and exiftool to develop the raw
file and copy the exif meta data over to the new file.
This can probably be done with a one liner under linux, can someone help
me convert the functionality of this to an sh or perl script?
Thank you, the windows batch is below.
##################################
@echo off
cls
echo from CRW raws
%~d1
cd\
cd %~p1
cd RAW
dir /B *.CRW > raw.txt
copy C:\raw_converters\.badpixels ..\
:: @echo on
set Sufix1=tiff
::
FOR /f %%a in (raw.txt) do call :de_raw %%a
GOTO SUB_DONE
:de_raw
:: cd ..
IF EXIST "..\%~n1.%Sufix1%" GOTO :EOF
echo use dcraw to convert %~nx1 to "%~n1.%Sufix1%"
C:\raw_converters\dcraw.exe -T -v -w -B 2 4 "%~n1.CRW"
:: C:\raw_converters\dcraw.exe -T -v -w -K "C:\raw_converters\dark.pgm"
"%~n1.CRW"
:: worst for some reason
::
echo use exiftool to copy all meta data from %~nx1 to "%~n1.%Sufix1%"
C:\raw_converters\exiftool.exe -TagsFromFile "%~n1.CRW" "%~n1.%Sufix1%"
::
::
echo del "%~n1.%Sufix1%_original"
del "%~n1.%Sufix1%_original"
echo move "%~n1.%Sufix1%" to ..\
move "%~n1.%Sufix1%" ..\
:: cd RAW
GOTO :EOF
:SUB_DONE
del raw.txt
del ..\.badpixels
:: http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html
::
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]