Moving files from a Zipped folder to respective folders(name of the folders to be derived from file names)

16 Views Asked by At

We have a list of files in an excel spreadsheet. We need to search for these files in a zipped folder and then create a separate folder based on the file names and move them to the respective folder.

Like there are 12 files with a name Report_AUS-1200-XXXXXXXXX.trm in the spreadsheet, then we would like to look for these 12 files in the zipped folder and create a folder named AUS and move these 12 files to that folder and similarly iterate over the full list

I have so far tried using the shutil library to move the files around but facing issues creating a new folder every time based on the names of the files

0

There are 0 best solutions below