Create Zip file with no extra folder info
tonys111 at erols.com
Fri Sep 22 21:34:59 CEST 2000
"Paul Goodyear" <paul at gudge.demon.co.uk> wrote in message
news:rUEy5.12429$g12.952332 at news1.cableinet.net...
> If just created a zip file using
> zip = zipfile.ZipFile('c:\\zipfile.zip','w')
> The zip file is created a okay but I want to be able to create it with no
> folder info.
> I get in the path "\\<machine>\<directory>\<directory>\
> All I want is nothing to be displayed in the path column.
> Please Help
> Paul Goodyear
looks like zipfile::write takes a second (and third) parameter. the
following accomplished what you want for me:
>>> import zipfile;
>>> z = zipfile.ZipFile('foo.zip', 'w');
>>> z.write('C:/boot.ini', 'anotherFileName.ini');
More information about the Python-list