Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Archiving
xsriniva
I have a requirement wherein i have to archive the dcrs based on their creation date in the data directory.
Pl let me know if this is possible.Any pointers to articles will be welcome
Find more posts tagged with
Comments
mogoo
When you say "archive the DCRs", what specifically needs to happen? Does the dcr need to physically go away, or just be run through an "archive" tpl, or what? Need more info. And while you're at it, what platform and version of teamsite are you on?
Bubas_IWOV
Ok, from want I understand the best solution is for you is to use FormAPI to automatically name your dcrs with a time stamp atached to the dcr name or dcr name being equal to the time stamp.
this will allow you to archive the dcr by date.
Regards
Bruno
xsriniva
What i mean by archiving is i want to store them in sub folders with say "yyyymm" format.I expect a lot of dcrs for that specific dct and for editing a dcr instead of going thru the whole list in data dir it will be easy if they have some subfolders under data which will make it easier to locate a dcr
Adam Stoller
Borrowing from the previous response - use FormAPI to name the data/sub-directory for the DCR - probably using a field within the DCT/DCR to capture the filename portion to use. Or, if you are initiating the creation of DCRs from within a workflow - then just create the boilerplate DCR where you want it from the start before you invoke the Edit DCR on it.
--fish
(Interwoven Senior Technical Consultant)
hemranga
Hey this can be achieved using a perl script.
I have done a similar thing.
You can use the iwattrib command and then pass crdate as the paramenter. This will give you the created date of the file and then u can store this in an array for all the files and proceed with the next thing.
Let me know if you need more help..
Hemanth
Adam Stoller
iwattrib vpath crdate is *not* guaranteed to be an accurate indication of when the file was first created within TeamSite. A number of editing applications (potentially including TeamSite Templating? and/or LaunchPad) replace the existing file with a new file when saving a modified copy - and thus creates a new inode for the file, with a new creation timestamp - and *that* is the timestamp that you'll see associated with the file via iwattrib using 'crdate'.
I'm not sure if there's a better way to do this - but: `iwrlog -c -m vpath | tail -1` will give you the creation date of the first [active] version of the file...
--fish
(Interwoven Senior Technical Consultant)
xsriniva
I am looking for some sample code.
Can someone please provide it