open -a Automator #-------------------------------------------------- Drag or add actions here to build your workflow: Library: Finder -> Action: Get Selected Finder Items Library: Automator -> Action: Run Shell Script - Shell: /bin/sh - Pass input: as arguments current_dir="$@" name_of_new_dir="NewFolder" if [[ -d "${current_dir}" ]] && [[ -w "${current_dir}" ]]; then /bin/mkdir -p "${current_dir}${name_of_new_dir}" fi exit 0 # now save the newfolder Automator workflow as a contextual menu item Automator -> File -> Save As Plug-in ... -> Save Plug-in As: newfolder -> Plug-in for: Finder -> Save #-------------------------------------------------- open ~/Library/Workflows/Applications/Finder/newfolder.workflow # now open your Home directory, right-click on a folder and select Automator -> newfolder to create a "NewFolder" open ~
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
newfolder contextual menu item with Automator (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» "openterminal" contextual me... in shell osx mac bash unix terminal file folder open cd item menu automator contextual nano
» virusscan contextual menu it... in shell osx mac bash unix scan menu clamav virus clamdscan automator cocoadialog contextual
» Changing the Finder "Open Wi... in awk shell osx mac bash unix finder file application open menu contextual lsregister duti with wsupdate
» seticon - set icon of Mac OS... in shell osx mac bash unix file folder directory seticon icon resourcefork wsupdate
» dirmodes in shell osx mac bash unix directory ownership permission
» open or cd to the directory ... in shell osx mac bash unix file open cd directory shortcut
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails