rename command worked (everything is still here :)) ) . Thanks Daniel
On Wed, 27 Feb 2008 16:12:41 +0100Use at your own risk. Make a backup before try.
"Amar Cosic" <amar.cosic@gmail.com> 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
>
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
--
gentoo-user@lists.gentoo.org mailing list