Re: Obtaining the attributes and properties of a folder recursively.



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
.



Relevant Pages

  • Re: Comparing old and new state data in an object?
    ... After a certain amount of processing, ... > compare after a particular event occurs. ... The snapshot is conceptually a different problem space ... way to identify [HistorySnapshot], such as a timestamp or a sequence ...
    (comp.object)
  • RE: [Full-Disclosure] Windows Registry Analzyer
    ... Use RegMon for real-time Reg watching and try this product for Snapshot ... RegShot is a small registry compare utility that allows you to quickly ... >> Anyone know of any free tools to analyze what changes have ...
    (Full-Disclosure)
  • Re: ISO: sql server table comparison utility
    ... the vendor product uses hundreds of ... know we don't care to compare. ... csv files may not be a good fit for generic data. ... restore utility. ...
    (comp.lang.tcl)
  • Re: comparing some but not all fields in lists
    ... I should compare only 3 of the 82 fields in each list. ... If I read in each csv file as an array, List::Compare does a nice job of ... comparing all 82 fields as a single array element. ... Every line with funny characters is an error. ...
    (perl.beginners)
  • Re: Exporting Windows XP Services Settings
    ... "Regshot is a small, free and open-source registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one - done after doing system changes or installing a new software product. ...
    (microsoft.public.windowsxp.general)