title: Applescript - Convert String to File Reference
body: <p>I can't seem to figure out how to convert my string to a file </p>
  
  <p>reference.  </p>
  
  <pre><code>--savestring4 is the directory listing "/Volumes/Jobs/Artwork/Howard Keys/7-17-14/Happy_Keys/KW_CHK1-CHK49"
  --myCode1 is the filename "845849005126"
  
  set p to savestring4 &amp; "/" &amp; myCode1 &amp; ".eps"
  
  set AppleScript's text item delimiters to "/"
  set theTextItems to text items of p
  set AppleScript's text item delimiters to ":"
  set p2 to theTextItems as string
  set AppleScript's text item delimiters to {""}
  
  
  set AppleScript's text item delimiters to ":Volumes:"
  set theTextItems2 to text items of p2
  set AppleScript's text item delimiters to ""
  set p to theTextItems2 as string
  set AppleScript's text item delimiters to {""}
  
  set mybarcodepath to a as alias
  </code></pre>
  
  <p>I keep getting and error on the last command saying it cant find the file</p>
  
  <p>return p outputs:</p>
  
  <p>"Jobs:Artwork:Howard Keys:7-17-14:Happy_Keys:KW_CHK1-CHK49:845849005126.eps"</p>
  
  <p>Any help would be greatly appreciated!</p>