Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python extract all zip files from a directory

import zipfile, os
working_directory = 'my_directory'
os.chdir(working_directory)

for file in os.listdir(working_directory):   # get the list of files
    if zipfile.is_zipfile(file): # if it is a zipfile, extract it
        with zipfile.ZipFile(file) as item: # treat the file as a zip
           item.extractall()  # extract it in the working directory
Comment

extract all file in zip in python

extractall(path=None, members=None, pwd=None)
Comment

PREVIOUS NEXT
Code Example
Python :: remove timezone from column pandas 
Python :: "scrapy shell" pass cookies to fetch 
Python :: pandas dataframe total column 
Python :: why is there a lot of numbers in python 
Python :: division operators in python 
Python :: duck typing in python 
Python :: rezise object pygame 
Python :: smma python 
Python :: usage code grepper 
Python :: print items of list using list comprehension in python 
Python :: Let’s add a docstring to the greeting method. How about, “Outputs a message with the name of the person”. 
Python :: File "main.py", line 21 print("total harga:idr", bakso bulat +str Minuman Drink): ^ SyntaxError: invalid syntax 
Python :: gnuplot sum over a column 
Python :: fb account api grabber 
Python :: linux pyspark select java version 
Python :: build an ai writer web crapper 
Python :: python coding for y, you will also display a “bar” of ‘X’ characters to represent the number. For example, the prime number 2 would be represented as “X 2”. 
Shell :: install git on amazon linux 
Shell :: bash: netstat: command not found 
Shell :: ubuntu uninstall redis 
Shell :: how to do compress video in linux 
Shell :: brew uninstall mysql 
Shell :: remove all docker images 
Shell :: install snap on kalicannot communicate with server: Post "http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect: no such file or directory 
Shell :: dns flush windows 
Shell :: conda opencv 
Shell :: Ultimate Perfomance command 
Shell :: ubuntu 18 ffmpeg install 
Shell :: heroku logs tail 
Shell :: how to see the remote url in git 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =