Obtaining the attributes and properties of a folder recursively.

venutaurus539 at gmail.com venutaurus539 at gmail.com
Fri Mar 20 05:42:05 EDT 2009


On Mar 20, 1:58 pm, Tino Wildenhain <t... at wildenhain.de> wrote:
> venutaurus... at gmail.com wrote:
> > Hello all,
> >             Is there any way to list out all the properties (name,
> > type, size) and attributes( Accesstime, mod time, archived or readonly
> > etc) of a folder and its contents recursively. Should I need ot go
> > inside each and every directory to list them? This has to be for
> > Windows.
> >          I have to obtain the following attriubtes of all the files
> > recursively in a directory:
>
> > NAME\ FILE CREATION TIME \ MODIFICATION TIME \ ACCESS TIME \
> > ATTRIBUTES \ ACLs \ File SIze \
>
> Just some hints you might want to check:
>
> os.walk
>
>  >>> help(os.walk)
>
> and os.stat
>
> please see the example for os.walk - this
> would work on every platform supported by
> python.
>
> for acls, a little more work would be needed
> if you want something filesystem specific but
> posix style information is included with stat()
>
> Regards
> Tino
>
>  smime.p7s
> 4KViewDownload

Thanks for your suggestion. By the way the attachment which have added
has some unknown file extension. May I know how can I view it?



More information about the Python-list mailing list