title: Applescript: Select a finder folder using part of a string
body: <p>I'm looking for a way/code to select a folder within a specific folder that contains part of a string from a variable</p>
  
  <p>I have folderA and within folderA are numerous folders. All the folders within folderA start out with a 5 digit number followed by an "_" and then a short description. ie, 12345_Folder Test 1, 54321_Folder Test 2, 99999_Folder Test 3, etc...  </p>
  
  <pre><code>    tell application "Finder"
          set folderA to folder "FolderA" of folder "Desktop" of folder "MacUser" of folder "Users" of startup disk
          set jobNum to text returned of (display dialog "Enter 5 Digits Only:" default answer "")
          open folderA
          set selected_item to (folder whose name contains jobNum in folderA) -- This is what's failing for me. 
  -- from here on I would like to do other things such as run other parts of a script.
  end tell
  </code></pre>
  
  <p>---Script Error Message</p>
  
  <blockquote>
    <p>Can’t get folder whose name contains jobNum of folder "FolderA" of
    folder "Desktop" of folder "prepress_js" of folder "Users" of startup
    disk of application "Finder". ----</p>
  </blockquote>
  
  <p>Any help is greatly appreciated!</p>