|
|
|
|
|
by Joker_vD
824 days ago
|
|
import subprocess
subprocess.run(['tar', 'cvzf', 't.tar.gz', *list_of_files])
or indeed import os, subprocess
subprocess.run(['tar', 'cvzf', 't.tar.gz', *(f.path for f in os.scandir('.'))])
if you need files from the current directory |
|