On 17 Jan 2007 08:31:07 -0800, [EMAIL PROTECTED] wrote:
>
>Thanks a mill - os.path.getctime(f) is what I needed. Unfortunately, my
>attempts to turn the integer it returns into a date have failed.
>
os.path.getctime(fn)#fn was created today, 1/17/2007
>1168955503
>
>I tried to convert this
Thanks a mill - os.path.getctime(f) is what I needed. Unfortunately, my
attempts to turn the integer it returns into a date have failed.
>>> os.path.getctime(fn)#fn was created today, 1/17/2007
1168955503
I tried to convert this to a date object by typing
>>>datetime.date.fromordinal(1168955
On Tue, 16 Jan 2007 07:44:29 -0600, skip wrote:
> Thomas> I've used glob.glob to create a list of all files whose name
> Thomas> matches a substring, but I don't see how I can use it to
> Thomas> identify files by their creation date.
>
> Sumthin' like:
>
> files = [f for f in glob.g
Thomas> I've used glob.glob to create a list of all files whose name
Thomas> matches a substring, but I don't see how I can use it to
Thomas> identify files by their creation date.
Sumthin' like:
files = [f for f in glob.glob(globpat)
if os.path.getctime(f) > t
I'd like to create a list of all files in a directory that were created
after a certain date. How does one do this? I've used glob.glob to
create a list of all files whose name matches a substring, but I don't
see how I can use it to identify files by their creation date.
Thanks in advance for the