'''Created Mar 7, 2022 Levi''' import os import shutil from xls2xlsx import XLS2XLSX # src = '//mozaiq/levente.marton/#cnta/backup/Facturi/Facturi_Mol/EXCEL/' src = 'c:/Users/levi/Downloads/office/excel/fan/' # dst = '//mozaiq/levente.marton/#cnta/backup/Facturi/Facturi_Mol/EXCEL/xlsx' dst = 'c:/Users/levi/Downloads/office/excel/fan/xlsx' files = filter(lambda f: f.endswith('.xls'), os.listdir(src)) for file in files: # shutil.copy2(os.path.join(src, file), os.path.join(dst, file.replace('xls', 'xlsx'))) x2x = XLS2XLSX(os.path.join(src, file)) x2x.to_xlsx(os.path.join(dst, file.replace('xls', 'xlsx')))