py script modify it's Modified Time?

est electronixtar at gmail.com
Thu Apr 12 03:05:12 EDT 2007


On 4月12日, 上午2时26分, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
> En Wed, 11 Apr 2007 10:33:57 -0300, <kyoso... at gmail.com> escribió:
>
> > On Apr 11, 6:14 am, "est" <electronix... at gmail.com> wrote:
> >> I guess os.stat() could retrieve information about ctime, mtime of a
> >> path, but how can I change them? Is it possible to make it work both
> >> under Win32 and Linux?
>
> > I am not sure if you can change a creation time of a file on NT, but
> > the rest sounds possible; according to this post anyway:
>
> >http://mail.python.org/pipermail/python-list/2001-August/100214.html
>
> That post is rather old... With os.utime you can set the access and  
> modified time, and it's portable.
> Creation time isn't stored on [the normal filesystems used by] Linux, and  
> on Windows you can use win32file.SetFileTime
>
> > It mentions using the win32 modules, which can be found here:
> >http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/win32_...
>
> Betterhttps://sourceforge.net/projects/pywin32/
>
> --
> Gabriel Genellina

Thanks guys ,you are of great healp!




More information about the Python-list mailing list