first back up your files! you can use a python one-liner:
python -c "import glob,os; [os.rename(fn, fn.replace('.MP3', '.mp3')) for fn in glob.glob('PATH_TO_YOUR_DIRECTORY')]"
EDIT:
Here is a detailed explanation of how the one-liner actually works. Using python -c
we are passing a command to the python interpreter. After importing the libraries os
for the rename
function and glob
for file listing, we need to iterate through the file list in the given directory, which I called PATH_TO_YOUR_DIRECTORY
, for example something like ./*
for everything in the current directory.
In the one-liner syntax unfortunately for
loops don't work after import
notation, so we need to use the bracket notation. I.e. for every file or directory name that glob
is giving us from the given path in form of a string, we replace *.MP3 to *.mp3.
Since OP did not mention recursive search, I did not include it in the first place.