Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Help] Files number and total size in a specific folder

Status
Not open for further replies.

NaturelBenton

Programmer
Jan 7, 2014
1
FR
Hi,

I'm a bit stuck! I would like to list the number of elements (files like office documents, pdf and so on) in a specific folder and the total size of these files.

Im wondering if it's possible to do that using a LiveReport and a SQL query on (not only this one i guess) the DTREE table (if i use the id of the root folder, i guess it's possible to loop on the different sub nodes and calculate that but i'm a bit stuck at this point).

Any solution is welcomed of course!

Thanks in advance.

Best Regards,

Naturel.
 
Do you not have a KB account? or access to the schema(it is free to a signed NDA)
Clues:A document whether it is PDF or DOC is still a subtype=144 in dtree, that way you can get all the dataid's that have 144 in a parentid
so select dataid from dtree where parentid=<folder's dataid> and subtype=144
with the dataid you need to look in dversdata this time it becomes the docid.dversdata has a filesize column
If you go to your livelink there is a bunch of canned live reports that OT bundles you can basicaly now repurpose the
queries

if you want to iterate subfolders/containers you can use dtreeancestors as that contains the relations that allow you to iterate over children.

Sorry for not posting full queries in a public forum.There are thousands of such queries already in the KB even this may have some as well.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top