Re: Obtaining the attributes and properties of a folder recursively.
- From: Tim Golden <mail@xxxxxxxxxxxxxxx>
- Date: Fri, 20 Mar 2009 13:58:00 +0000
venutaurus539@xxxxxxxxx wrote:
Thank you for your suggestion but.. I'll have around 1000 such files
in the whole directory and it becomes hard to manage such output
because again I've to take this snapshot before backing up the data
and have to do the same and compare both when the data gets restored,
just to verify whether the restore happened successfully or not.
The .dump is simply a way of seeing quickly what the data is.
If you want to store is somewhere (.csv or whatever), you can
just select the attributes you want. Note, though, that ACLs
are tricky to compare. Something like the following might do
what you want, perhaps?
<code>
import os
import csv
from winsys import fs
with open ("info.csv", "wb") as f:
writer = csv.writer (f)
for f in fs.flat ("c:/temp/cabsdk"):
print f
writer.writerow ([
f, f.created_at, f.written_at, f.attributes, f.security (),
f.size
])
os.startfile ("info.csv")
</code>
This uses the security's SDDL representation, which while
opaque does at least give you a before-and-after check.
TJG
.
- Follow-Ups:
- Re: Obtaining the attributes and properties of a folder recursively.
- From: venutaurus539@xxxxxxxxx
- Re: Obtaining the attributes and properties of a folder recursively.
- References:
- Obtaining the attributes and properties of a folder recursively.
- From: venutaurus539@xxxxxxxxx
- Re: Obtaining the attributes and properties of a folder recursively.
- From: Tim Golden
- Re: Obtaining the attributes and properties of a folder recursively.
- From: venutaurus539@xxxxxxxxx
- Obtaining the attributes and properties of a folder recursively.
- Prev by Date: Compiling modules in OSX, eg PyUSB?
- Next by Date: Re: Unable to compile pyprocessing module on SUN solaris
- Previous by thread: Re: Obtaining the attributes and properties of a folder recursively.
- Next by thread: Re: Obtaining the attributes and properties of a folder recursively.
- Index(es):
Relevant Pages
|