Breathe Hacker
Breathe Hacker

Reputation: 41

On creation of folder in a specified folder create sub folders in the new folder

I'm new to applescript and automator.I have explored the different threads at apple but unable to find something useful. Well My problem is that I have a folder i.e "work" i have applied folder action on it. On creation of new folder at "work" i.e "abc" I want to create three new folders in "abc". Check out my code

on adding folder items to this_folder after receiving added_items
  tell application Finder
    repeat with this_item in added_items
        make new folder at this_item with properties {name:"Main"}
        make new folder at this_item with properties {name:"Lower"}
        make new folder at this_item with properties {name:"Upper"}
   end repeat
  end tell
end adding folder items to

Upvotes: 1

Views: 49

Answers (1)

vadian
vadian

Reputation: 285059

Almost...

Finder must be in double quotes

tell application "Finder"

Upvotes: 1

Related Questions