You are not logged in.
Pages: 1
I need a way to quickly cause every file within a folder to have it's name changed to lower case, along with all of the folder's subdirectories and the directories/files within them. Is there a command to do this, or does it need a shell script to work?
Offline
KRename or zsh's zmv (zmv '(**/)' '${(L)1}') comes to mind.
Offline
You can do this with coreutils, but perl is so much more comfortable to me:
find . | perl -nle '$f = $_; s|$ENV{PWD}/||; rename($f, lc)'
(note: not really tested)
Offline
Using command you suggested, I was able to change most of the files to lowercase. The only ones that didn't change their name were the ones that had spaces in their name. I need those files changed as well, but for now I'm going to change them manually.
EDIT: I take that back. The files it missed were all of the files within subdirectories.
Last edited by Falcata (2008-02-29 04:33:24)
Offline
Here are some ideas: http://gentoo-wiki.com/TIP_lowercase_fi … irectories
I tried the "convmv" method with "-r" switch added ("convmv -r --notest --lower *") and apparently it works fine.
Offline
It seems to have very well, even affecting the files that had spaces in their names.
Also, why is it saying my version of perl has fleas?
Last edited by Falcata (2008-02-29 13:36:53)
Offline
Pages: 1