Save the line below into a plain text file and give it the .jsx extension.
app.activeDocument.activeLayer.name = decodeURI(app.activeDocument.name).match(/(.*)(\.[^\.]+)/)[1];
Then create an action that runs that script. Then run File-Automate-Batch using that action.