[Tutor] Not storing the PATH in ZipFile?
nrhird at gmail.com
Wed Oct 14 18:37:17 CEST 2009
That was it. Thanks so much! I was looking at the docs and didn't
think that applied to the path that was stored.
On Wed, Oct 14, 2009 at 12:16 PM, Kent Johnson <kent37 at tds.net> wrote:
> On Wed, Oct 14, 2009 at 11:38 AM, Nick Hird <nrhird at gmail.com> wrote:
>> I was reading another thread and decided to work on a little project
>> to backup some files on a regular basis. Since this will mostly be on
>> windows i am using zipfile and i can create my zip file just fine and
>> all the files are there, it works great! My question is however, is
>> there a way to NOT store the path in the zip file? When i decompress
>> the files, i would like them to not be associated with a particular
>> folder or path, just the files
> ZipFile.write() takes an optional arcname parameter, this is the name
> the file wll have in the archive. If you pass the plain file name (no
> path components) as arcname I think it will do what you want.
More information about the Tutor