Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

looping over folder to extract zip winrar python

for root, dirs, files in os.walk(path):
    if not any(f.endswith(".mkv") for f in files):
        for file in files:
            pth = join(root, file)
            if file.endswith("zip"):
                print("Unzipping ",file, "...")
                check_call(["unzip" , pth, "-d", root])
            elif file.endswith((".rar",".r00")):
                check_call(["unrar","e", pth,  root])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #looping #folder #extract #zip #winrar #python
ADD COMMENT
Topic
Name
1+1 =