extract_files#

extract_files(archives: list, output: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path], overwrite: bool = False) list[source]#

Extract all archived files. Overwrites if specified.

>>> file_path = ['D:/path/to/zip1.zip', 'D:/path/to/zip2.zip']
>>> output = 'D:/path/to/output'
>>> extract_files(file_path, output, overwrite=True)
['D:/path/to/output.zip1', 'D:/path/to/output.zip2']
Parameters
  • archives (list of str) – List of archives to be extracted

  • output (str) – Output folder where extracted files will be written

  • overwrite (bool) – Overwrite found extracted files

Returns

Extracted files (even pre-existing ones)

Return type

list