如何制作此文件路径
zip.write (userhome+'\\thefolder\\')
压缩"文件夹"中的每个文件例如,我怎么能像这样添加一个通配符到底:
zip.write (userhome+'\\thefolder\\*')
答案 0 :(得分:1)
shutil.make_archive( base_name = '/tmp/myBackup.zip',
format = 'zip',
root_dir = userhome+'\\thefolder\\',
base_dir = './' )