Beispiel #1
0
def handle_rename(args):
    service = get_service_object()
    file_id = args[0]
    new_name = args[1]
    gdrive.rename_file(service, file_id, new_name)
    dbhelper.rename_file(file_id, new_name)
    print "renamed %(file_id)s to %(new_name)s" % {"file_id" :
            file_id, "new_name" : new_name }
Beispiel #2
0
def rename_file(file_id, new_name):
    service = get_service_object()
    gdrive.rename_file(service, file_id, new_name)
    dbhelper.rename_file(file_id, new_name)
    print "renamed %(file_id)s to %(new_name)s" % {"file_id" :
            file_id, "new_name" : new_name }