On Wed, 27 Feb 2008 16:12:41 +0100
"Amar Cosic" <[EMAIL PROTECTED]> wrote:
> Hello
>
> I have issue where I have something.TXT something.PDF and I need to
> rename them to something.txt something.pdf (so with lower cases) . Is
> there any easy way to do this (command,script? )
>
> Thanks
>
Use at your own risk. Make a backup before try.
1)
rename ".PDF" ".pdf" *.PDF
rename ".TXT" ".txt" *.TXT
2)
find . -iname "*.pdf" -o -iname "*.txt" | while read -r oldname
do
newname=$(echo "${fname}" | tr [[:upper:]] [[:lower:]])
mv "${oldname}" "${newname}"
done
--
Best regards,
Daniel
--
[email protected] mailing list