[Digikam-users] Extension aware rename (maintain raw file and jpg association by basename)?

Peter A. Gustafson peter.gustafson at wmich.edu
Wed Aug 4 22:30:11 BST 2010

On Wednesday 04 August 2010 16:15:24 Johannes Wienke wrote:
> Ah ok, sorry, Didn't see that. I don't think there is a solution for
> this right now. Andi?
> Regards,
> Johannes

OK... thanks.  
I'll wait for Andi to reply and then (presumably) file a feature request.  I 
assume those working in raw may appreciate this feature.

In the interim for any seeking this feature, below is a bash script I used to 
renumber.  This can then be coupled with the digikam renumber process and 
[file] string to set the desired filenames.  (ie a two step process).  Be 
warned I didn't make this robust so examine and use with care.  

Thanks again!

PS (Uncomment the important line to make it work... I wanted people to think 
before executing!)


function renumber {
    echo Renumbering the archive
    for base in `ls $*|cut -f1 -d.|uniq`; do
	name=`printf %03d $index`
	echo rename ${base} ${name} ${base}.*;
	#rename ${base} ${name} ${base}.*;
	let index=index+1;

if [ -z "$1" ]; then
  echo usage: $0 images
  exit 1
    renumber $*

More information about the Digikam-users mailing list