@click.command(u'bulk-rename')
@click.argument(u'doctype')
@click.argument(u'path')
@pass_context
def _bulk_rename(context, doctype, path):
 from frappe.model.rename_doc import bulk_rename
 from frappe.utils.csvutils import read_csv_content
 site = get_site(context)
 with open(path, u'r') as csvfile:
  rows = read_csv_content(csvfile.read())
 frappe.init(site=site)
 frappe.connect()
 bulk_rename(doctype, rows, via_console=True)
 frappe.destroy()

@ click . command ( u'bulk-rename' ) @ click . argument ( u'doctype' ) @ click . argument ( u'path' ) @ pass_context def _bulk_rename ( context , doctype , path ) : from frappe . model . rename_doc import bulk_rename from frappe . utils . csvutils import read_csv_content site = get_site ( context ) with open ( path , u'r' ) as csvfile : rows = read_csv_content ( csvfile . read ( ) ) frappe . init ( site = site ) frappe . connect ( ) bulk_rename ( doctype , rows , via_console = True ) frappe . destroy ( )
rename multiple records via csv file .