Jump to content
UBot Underground

Zip Unzip With Python


Recommended Posts


*****Zip*****
run python("import shutil
import os
os.chdir(\'D:/\')
shutil.make_archive(\'test\',
\'zip\',
\'folder-or-file-you-want-to-zip\')")

*****UNZIP*****
run python("import zipfile
with zipfile.ZipFile(\"D:/test.zip\",\"r\") as zip_ref:
zip_ref.extractall(\"D:/test\")")

 

  • Like 2
Link to post
Share on other sites

also supported formats

 

  • zip: ZIP file (if the zlib module or external zip executable is available).
  • tar: uncompressed tar file.
  • gztar: gzip’ed tar-file (if the zlib module is available).
  • bztar: bzip2’ed tar-file (if the bz2 module is available).
  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...