keep original date and time of unzipped files

Dan Bishop danb_83 at yahoo.com
Thu Jul 10 19:33:13 EDT 2003


"Bartolomé Sintes Marco" <BartolomeSintes at ono.com> wrote in message news:<hjfPa.26867$FN3.2232703 at news.ono.com>...
> Hi,
> 
> In this mail,
> http://www.mail-archive.com/kragen-hacks@canonical.org/msg00030.html
> Kragen Sitaker explained how to unzip a file in Python
...
> The unzipped files date and time are not the original ones, but
> when the unzipping is done. Is there a way to keep the
> original files date and time?

You can change a file's date and time with

os.utime(filename, (accessTime, modificationTime))




More information about the Python-list mailing list