title: Store Path as String Applescript
body: <p>In my Applescript, I'm choosing a file of which I would like to store the path (to be opened later). </p>
  
  <p>When I tried storing the path of the file as a string, this is the error I received:</p>
  
  <blockquote>
    <p>error "Can’t make path of alias \"Macintosh
    HD:Users:Username:Desktop:Folder:File.xls\" into type string." number -1700
    from path of alias "Macintosh HD:Users:Username:Desktop:Folder:File.xls" to string</p>
  </blockquote>
  
  <p>How can I effectively store this file path, so that I may recall it later when opening this file?</p>
  
  <p><strong>Applescript:</strong></p>
  
  <pre><code>tell application "Finder"
      set filePath to path of (choose file) as string
      set fileName to name of file filePath
  end tell
  </code></pre>
  
  <p>*Note: I also tried <code>as text</code>.</p>