def create_folder(name, location='\\'):
 if (name in list_folders(location)):
  return '{0} already exists'.format(name)
 pythoncom.CoInitialize()
 task_service = win32com.client.Dispatch('Schedule.Service')
 task_service.Connect()
 task_folder = task_service.GetFolder(location)
 task_folder.CreateFolder(name)
 if (name in list_folders(location)):
  return True
 else:
  return False

def create_folder ( name , location = '\\' ) : if ( name in list_folders ( location ) ) : return '{0} already exists' . format ( name ) pythoncom . CoInitialize ( ) task_service = win32com . client . Dispatch ( 'Schedule.Service' ) task_service . Connect ( ) task_folder = task_service . GetFolder ( location ) task_folder . CreateFolder ( name ) if ( name in list_folders ( location ) ) : return True else : return False
create a new folder inside the one received as a param .