Skip to content

Instantly share code, notes, and snippets.

Created August 13, 2011 15:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Delete non-empty folder in Sublime Text 2
# add this to the main command array...
{ "caption": "Delete Folder and Contents", "command": "delete_folder_recursive", "args": {"dirs": []} }
# add the following class...
class DeleteFolderRecursiveCommand(sublime_plugin.WindowCommand):
from shutil import rmtree
def run(self, dirs):
sublime.status_message("Folder could not be deleted")
def is_visible(self, dirs):
return len(dirs) == 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment