On Wed, Oct 14, 2009 at 11:38 AM, Nick Hird <nrh...@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. Kent _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor