if (characters -4 thru -1 of theName as string) is ".pdf" then do shell script "/usr/local/bin/exiftool -title=" & quoted form of theTitle & " -author=" & quoted form of theAuthor & " -subject=" & theKey & " -overwrite_original " & quoted form of thisPath