How to I set the "modification time" attribute of a file ?

David Stockwell winexpert at hotmail.com
Wed May 26 08:57:51 EDT 2004


Try this:

os.utime('c:\\temp\\spam.txt", None) # Set to current time

I found this in the Python 2.1 bible (book)

Good luck

David Stockwell
-------
Cell: http://cellphone.duneram.com/index.html




>From: "fowlertrainer at anonym.hu" <fowlertrainer at anonym.hu>
>To: python-list at python.org
>Subject: How to I set the "modification time" attribute of a file ?
>Date: Wed, 26 May 2004 14:52:01 +0200
>
>Hi !
>
>I want to change the "modification time" attribute of a file, after
>download - from python.
>But I don't find any function that do this.
>
>If it is don't exists in python, please write an os-specific command to
>this.
>
>I want to use it in Linux, and test it in Windows.
>
>Thanx for helps:
>Ft
>
>
>
>--
>http://mail.python.org/mailman/listinfo/python-list

_________________________________________________________________
Watch LIVE baseball games on your computer with MLB.TV, included with MSN 
Premium! http://join.msn.click-url.com/go/onm00200439ave/direct/01/





More information about the Python-list mailing list