As long as you don't mind it removing everything after the last dot in folder names as well as file names, you can do it using this:
Clipboard COPYNAMES=nopaths REGEXP (.+)\..* \1
If you want it to only affect folders, or handle more complex extensions (e.g. .part01.rar type extensions with multiple dots) then that's also possible, but more complex.