Script to show name of opened indesign template

I was wondering if there is a script that will show the original name of an indesign template. When i open a template, it opens as an untitled document, but i wwould like to be able to see the name of the file.

Thanks in advance!

As far as I know there is no property that keeps the original template filename. I always open templates via script because I know what template I intend to use. An option for you might be to label an object in the template with the filename so you can query the object. If you also write a droplet which simply opens the file it can trap the filepath and label the object in the untitled document after it opens. (Or it could also create the object and label it with the filepath.)

you could if your template is stored at the same path use something like the below, which uses the template name

tell application "Adobe InDesign CS6"
	set aPath to path to desktop
	set OrigionalTemplate to "Macintosh HD:Users:Budgie:Desktop:TEST TEMPLATE.indt" -- path to origional template
	set myName to OrigionalTemplate as string
	tell application "Finder"
		set _Title to (characters 1 thru -6 of myName as text) --adjust to suit the name of your template
	end tell
	open OrigionalTemplate
	save document 1 to (choose file name default name _Title default location alias aPath)
	close OrigionalTemplate saving no
end tell