5 Replies Latest reply on Apr 10, 2012 5:18 AM by PeterWindle

    AppleScript Folder creation help

      Hello,

       

      I have to create a dynamic AppleScript for creating a folder on Mac OS. I do have this script:

      ----------------------------------

      set theOutputFolderPath to path to desktop folder

      set theNewFolderName to "Daily Backups"

       

      tell application "Finder"

       

      if (exists folder (theOutputFolderPath & theNewFolderName as string)) = false then

      make new folder at desktop with properties {name:theNewFolderName}

       

      end if

       

      end tell

      ----------------------------------

       

      It works great, but it creates folder only on the Desktop. Some how I need to change the desktop folder to any variable (e.g. $output = Get (FilePath) ) wich is created in general FM scripting environment. I'm not familiar with AppleScript'ing and any help will be appreciated.

       

      BR,

      Giedrius

       

      http://www.yzysoft.com/