InDesign scripting

Hi all,
I am stuck and hoping someone can help. I am trying to write a script that will only run if my InDesign document is only run from within a specific folder. The through is the user can only open and run a PDF export of a InDesign document if it is within a Final:Ready for Production folder. If it is not, the script will return a error dialog.
So, it has to be a specific location that could be buried in a few sub-folders.
Any help is greatly appreciated.

Thanks, Chad

–Something like this could work:

tell application id "com.adobe.indesign" -- tested with CC 2019
	set theDoc to active document
	tell theDoc
		--return file path as string
		set fp to file path as string -- full file path of document
		if ":Final:Ready for Production:" is in fp then
			display dialog "It is" -- do pdf stuff
			display dialog "It is not" -- don't do pdf stuff
		end if
	end tell
end tell