title: Applescript: make new folder structure if it doesn't exist
body: <p>I've been searching through message boards trying to figure out how to execute this script. Essentially the goal is to be able to run this script while inside a folder and if certain folders do not exist, these folders would then be created. If they do already exist, nothing happens. Here's what I've cobbled together so far:</p>
  
  <pre><code>property archivesFolder : "Archives"
  
  property imagesFolder : "Images"
  
  property proofreadFolder : "Proofreading"
  
  property proofFolder : "Proofs"
  
  property sourceFolder : "Source"
  
  try
  
  tell application "Finder" to set theLocation to (folder of the front window as alias)
  
  end try
  
  tell application "Finder"
  
      if (exists folder archivesFolder) then
          (* do nothing *)
      else
          make new folder at theLocation with properties {name:archivesFolder}
      end if
  
      if (exists folder imagesFolder) then
          (* do nothing *)
      else
          make new folder at theLocation with properties {name:imagesFolder}
      end if
  
      if (exists folder proofreadFolder) then
          (* do nothing *)
      else
          make new folder at theLocation with properties {name:proofreadFolder}
      end if
  
      if (exists folder proofFolder) then
          (* do nothing *)
      else
          make new folder at theLocation with properties {name:proofFolder}
      end if
  
      if (exists folder sourceFolder) then
          (* do nothing *)
      else
          make new folder at theLocation with properties {name:sourceFolder}
      end if
  
  end tell
  </code></pre>
  
  <p>What am I doing wrong ? (forgive my n00b code formatting, at work and can't figure out how to create code blocks) Also, is it possible to this not just on the front window, but on a folder that is just selected? Any help given would be awesome.</p>