diff --git a/renext b/renext index 18445f7..a833ae1 100755 --- a/renext +++ b/renext @@ -2,7 +2,7 @@ # renext - Mass File Rename By "Extension" # Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA # All Rights Reserved -# $Id: renext,v 1.101 2006/02/09 00:13:13 root Exp $ +# $Id: renext,v 1.102 2006/02/09 00:56:42 root Exp $ if [ $# != 2 ] then @@ -10,11 +10,11 @@ echo " Renames files ending with '.oldext' to end with '.newext'" else - for f in *$1 - do - tgt=`echo $f | sed s/\.$1/\.$2/` - echo $f $tgt - done + for f in *.${1} + do + tgt=`echo $f | sed s/\.$1$/\.$2/` + echo $f $tgt + done fi