parameter expansion

getting only the file name without extension ${FILENAME%.*}

getting only the extension ${FILENAME##*.}

remove first folder (until / ) ${FILENAME#*/}

getting filename ${PATHNAME##*/}

Much more on https://wiki.bash-hackers.org/syntax/pe#substring_removal