Autofill metadata title with file name, but without extension
I found a script that will let me autofill the InDesign document metadata with the file name, but it puts in the .indd extension at the end. Is there a way to get the script to leave out the file extension in the metadata title? Here is the script I'm using:
tell application "Adobe InDesign CC 2017"
tell active document
set document title of metadata preferences to name
--set x to document title of metadata preferences
save
end tell
end tell
And here is what my metadata looks like after I run it. I just don't want the .indd in there. Suggestions?

