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
» virusscan contextual menu it... in shell osx mac bash unix scan menu clamav virus clamdscan automator cocoadialog contextual
» dirmodes in shell osx mac bash unix directory ownership permission
» ws - web search from the com... in shell osx mac search bash unix commandline web
» snippet in shell osx mac html bash unix commandline web download convert textutil
» Switching firewall settings ... in shell osx mac bash unix ipfw firewall ruleset switch
» Delete WebKit search fields in shell osx mac bash unix safari webkit
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails