title: Applescript testing for file existence
body: <p>OK, I thought this would be a simple one, but apparently I'm missing something obvious. My code is as follows:</p>
  
  <pre><code>set fileTarget to ((path to desktop folder) &amp; "file$") as string
  
  if file fileTarget exists then
      display dialog "it exists"
  else
      display dialog "it does not exist"
  end if
  </code></pre>
  
  <p>Easy right? Unfortunately, when I run the script it returns the error </p>
  
  <pre><code>Can’t get file "OS X:Users:user:Desktop:files$".
  </code></pre>
  
  <p>It doesn't matter if the file exists or not, this is the same error I get. I've tried a dozen different things but it still stumps me.</p>