rename file names from lower case to upper case
Posted
by Adnan
on Stack Overflow
See other posts from Stack Overflow
or by Adnan
Published on 2010-04-11T13:50:07Z
Indexed on
2010/04/11
13:53 UTC
Read the original article
Hit count: 638
rename
Hello,
I have about 2k of file that are currently in lower case like:
file_one.cfr
file_two.cfr
....
I am searching for a fast way to rename them to upper case so they would be like;
FILE_ONE.cfr
FILE_TWO.cfr
....
If I use from my shell;
for i in *; do mv $i `echo $i | tr [:lower:] [:upper:]`; done
I can get all file and the file extensions to upper case.
But the extension should remain in lowercase, so my approach does not work.
Any programming language is welcome.
© Stack Overflow or respective owner