Resources: Linux and Apache

Convert file extensions to lowercase

10 December 2012

Having issues with upper and lowercase file names? Use this script to programatically convert all extensions to lowercase. It will affect all files within the current folder.

find . -name '*.*' -exec sh -c ' a=$(echo {} | sed -r "s/([^.]*)\$/\L\1/"); [ "$a" != "{}" ] && mv "{}" "$a" ' \;

Tags: , , ,

Let's work together