Renaming All Caps Filename Into Lower Case
HIgh guuys I have this folder that consist all caps filename like:
INDEX.HTML MEMBERS.HTML CONFIRM.HTML SUB.HTML ALL.HTML ETC.. Its too many to manually rename each file. Is there a linux command to convert all caps filename into a lowercase? Thank You. |
I don't know of any builtins to do this, but you could probably do this with a little shell script:
Code:
#!/bin/bash |
How should I run the script its should be ./scriptname.sh right? where is the old filen name and the new filename? Anyway, I think the script is good only for few files to be renamed coz it is specific to which file? What if there is a hundred to be renamed? Thanks you
|
To run the script it's just ./filename
You only need the .sh if you actually saved the script file with the extension .sh Ah, I've just noticed a mistake. The mv line should in fact read mv $oldname $newname (edit)Just one more thing, this won't work on case-insensitive filesystems (e.g. vfat). |
All times are GMT -5. The time now is 08:50 AM. |