This also works in Bash and is described here :
$ {line ## substring}
Removes the most matching $ substring from the string $ string.
*is a wildcard that matches any. Your example removes the path from the file, not the extension.
$ bazfile='/foo/bar/baz.txt'
$ echo ${bazfile##*/}
baz.txt
, %:
${% }
$substring $string.
$ echo ${bazfile%.*}
/foo/bar/baz