In case you need to separate a filename from an extension in bash here is a way:

filename=$(basename -- "$fullfile")
extension="${filename##*.}"
filename="${filename%.*}"