This is a simple bash script meant to clean the names of your songs or pictures. Just drop the script in a folder containing (only) your target files, and run it. It will change the names of anything apart from the script.

Download script.

#!/bin/bash

# By Juan Riaño
# juanriano.com

# Feel free to use as you please, a thank you card (or email) will be appreciated,
# but don't hold me responsible for whacking your grandma's pc.

# This script standardizes file names, it is meant mostly for mp3s or pictures, just
# copy this script inside the folder where the files are located and run it.
# The folder should only have the files you want to standardize. The script does:
# - change file name to lowercase
# - removes non ascii characters
# - replaces spaces by _

# This script is not meant to be short or fast, but rather easy to read and change.

file_to_lower() {
	local FILENAME	# file name without the extension
	local FILEEXT	# just the file's extension

	for file in *; do
		FILENAME="$(echo "${file%.*}" | tr '[:upper:]' '[:lower:]')"
		FILEEXT="$(echo "${file##*.}" | tr '[:upper:]' '[:lower:]')"

		if [ $FILEEXT != 'sh' ]; then
			if [ "$file" != "$FILENAME.$FILEEXT" ]; then
				mv "$file" "$FILENAME.$FILEEXT"
			fi
			echo "Changed extension to lower case: '$FILENAME'.'$FILEEXT'"
		fi
	done
}

remove_non_ascii() {
	local FILENAME	# whole name, including extension
	local FILEEXT	# just the file's extension

	for file in *; do
		FILENAME="$(echo "$file" | tr -cd "a-zA-Z0-9._- ñáéíóú")"
		FILEEXT="${file##*.}"

		if [ $FILEEXT != 'sh' ]; then
			if [ "$file" != "$FILENAME" ]; then
				mv "$file" "$FILENAME"
			fi
			echo "Removed non ascii chars for: '$FILENAME'"
		fi
	done
}

replace_spaces() {
	# replaces spaces and '-'' with '_'
	local FILENAME	# whole filename
	local FILEEXT	# just the file's extension

	for file in *; do
		FILENAME="$(echo "$file" | tr -s ' ' '_')"
		FILENAME=$(echo "$FILENAME" | tr -s '-' '_')
		FILENAME=$(echo "$FILENAME" | tr -s '_' '_')
		FILEEXT="${file##*.}"

		if [ $FILEEXT != 'sh' ]; then
			if [ "$file" != "$FILENAME" ]; then
				mv "$file" "$FILENAME"
			fi
			echo "Removed spaces, new file name: $FILENAME"
		fi
	done
}

file_to_lower
remove_non_ascii
replace_spaces