Is there a way to get the file size and modified date of a file?
File information??
Collapse
This topic is closed.
X
X
-
Stan CookTags: None -
Egor Bolonev
Re: File information??
Hello, Stan!
You wrote on Fri, 04 Jul 2003 05:59:10 GMT:
SC> Is there a way to get the file size and modified date of a file?
os.stat()
=========Beginn ing of the citation======= =======
import os,glob
a=glob.glob('c: \\*')[0]
print os.stat(a)[6],os.stat(a)[8]
=========The end of the citation======= =========
With best regards, Egor Bolonev. E-mail: ebolonev@rol.ru [ru eo en]
-
Stan Cook
Re: File information??
Thanks! I'll try that.
"Egor Bolonev" <ebolonev@rol.r u> wrote in message
news:be36cf$j23 $1@news.rol.ru. ..[color=blue]
> Hello, Stan!
> You wrote on Fri, 04 Jul 2003 05:59:10 GMT:
>
> SC> Is there a way to get the file size and modified date of a file?
>
> os.stat()
>
> =========Beginn ing of the citation======= =======
> import os,glob
>
> a=glob.glob('c: \\*')[0]
> print os.stat(a)[6],os.stat(a)[8]
>
> =========The end of the citation======= =========
>
> With best regards, Egor Bolonev. E-mail: ebolonev@rol.ru [ru eo en]
>[/color]
Comment
-
Stan Cook
Re: File information??
Thanks.....That did it... Just what I was looking for!
Stan
"Ian Bicking" <ianb@colorstud y.com> wrote in message
news:mailman.10 57300149.8085.p ython-list@python.org ...[color=blue]
> On Fri, 2003-07-04 at 00:59, Stan Cook wrote:[color=green]
> > Is there a way to get the file size and modified date of a file?[/color]
>
> os.stat(filenam e).st_size and os.stat(filenam e).st_mtime
>
> Ian
>
>
>[/color]
Comment
Comment