title: How to get filename to activated application within applescript?
body: <p>I am creating an applescript that opens terminal, I am dragging a file onto the script (using automater) and want the directory/name of file to be fed into my terminal application</p>
  
  <pre><code>    on run {input, parameters}
      tell application "Terminal"
          activate
          do script with command "qpdf --qdf arg1 output.pdf"
      end tell
  end run
  </code></pre>