Home
TeamSite
Get all dates a files is modified on
Joost
Hi all,
I was asked to produce a set of data showing how many files in a branch were modified in a certain month (for the past 12 months).
Initially I wrote a perl script that gets the modification date of a certain file and then checks if it is between the startdate (day 1 of the month) and the end date (day 1 of the next month). But a brainwave showed me a problem:
If file X has been modified in Sept, Oct and Dec. The mod date will be the one in Dec. So if I check between Sept 1st and Oct 1st I get a false (as the date is in Dec.).
I know TeamSite stores data on changes of files but I don't know a good way to find out where to find the data I'm looking for. Do you know a way to get ALL modification dates of a given file?
Joost
Find more posts tagged with
Comments
cute_guy
Try using the CLT
iwattrib
iwattrib filepath moddate
Joost
Correct me if I'm wrong but that only gets me one date, for as far as I can see the last mod date.
mstradling
If I read it correctly you want a list of all files modified during month X, regardless of if that was the time the file was last modified.
I can't think of anything easy to retrieve this information from the file system. All I can think of is to run over the file system and:
1) Check if file modifide date is earlier than reporting period (so if your looking for files modded in Oct. and a file was last modded in April it gets skipped).
2) If it's in the month, just report it.
3) If it's after the month, run a iwrlog CLT to retrieve the files version history and parse this looking for any modds in Oct.
Nasty.
Going forward it might pay to licence the TeamSite reporting module, which would log the edit data to a database and you can query that. If you don't want to spend the cash, you could set up some custom reporting with an iwat trigger - ModifyFSE(?)
Joost
I think iwrlog indeed sounds like the answer to this problem: it shows the moddates for all versions of the file. I just have to check if the moddate is between the start and the enddate.
I was trying to use the editions (check the creationdate of the edition folder and then get the moddate of the file) but your suggestion keeps me in the workarea (as some of my users have created over 500 editions over time I'd rather not go in there ;-D)