0

I know how to extract zipped files.

Extracting leaves the file in the zipped folder while it extracts a 'copy'.

I manually go into the zipped folder and cut the file. This leaves the zipped folder empty.

I want to do the same thing with Python code. That is cut the file from the zipped folder so it no longer exists in the zipped folder after cutting.

How do I do this please?

Log On
  • 69
  • 9
  • You can run shell commands from Python: https://stackoverflow.com/questions/89228/calling-an-external-command-in-python?rq=1 – Ignatius Apr 06 '19 at 00:02
  • Is there any problem on using `os.remove('file.zip')` after uncompressing it? – Carlos Roldán Apr 06 '19 at 00:02
  • Possible duplicate of [How do I delete or replace a file in a zip archive?](https://stackoverflow.com/questions/13917340/how-do-i-delete-or-replace-a-file-in-a-zip-archive) – manveti Apr 06 '19 at 00:10

0 Answers0