Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
To list out folder and sub folders size
Sugaindra_krishnakumaran
Hi All,Im seeking for help here to enable me to get query results for size of a folder and the sub folders within an area.I have this query which only gives me the total size of all the folders and sub folders. What I would like to have is a breakdown results of the folder size and its subfolders select round(sum(dv.datasize/1048576),0) from dtree d1, dversdata dv where d1.dataid=dv.docid and d1.versionnum=dv.version and d1.dataid in (select dataid from dtree start with dataid = %1 connect by prior dataid = abs(parentid))Pls help
Find more posts tagged with
Comments
Colin_Schmidt
I have been wanting this too and wrote one that works, but has a problem in that it takes a very long time, but from my tests is accurate giving the Bytes of the latest version, but I haven't fiugured out what's wrong or if anything is or if there's another way.SELECT dt.dataid, dt.name, dt.childcount, (select sum(dv.datasize) from livelink.dtree dt3 join livelink.dversdata dv on dt3.dataid=dv.docid and dt3.versionnum=dv.version where dt3.dataid in (select dt4.dataid from livelink.dtree dt4 where dt.dataid=dt4.parentid and dt4.subtype <> 0)) "Total MBs", LEVEL, SYS_CONNECT_BY_PATH (dt.name, ' | ') "Path" FROM livelink.dtree dt where dt.childcount>0 and dt.subtype=0 CONNECT BY PRIOR dt.dataid = dt.parentid START WITH dt.parentid =
Sugaindra_krishnakumaran
Thanks Colin. Indeed it does takes long time.I have came out with a query. Was able to produce the size of folders and the subfolders.The issue is that project workspace is not listed eventhough i've set the subtype to check on both folder and projects. Query as below. Could someone check and let me know if any modification needed here or pls correct it .select d1.parentid "ParentID",d1.dataid "ObjectID",d1.name, round(sum(dv.datasize/1048576),0) "Size in MB" from dversdata dv, dtree d1,dtree d2where d2.parentid=d1.dataid and d2.dataid = dv.docid and d2.versionnum=dv.version and d1.subtype in (0,202) andd1.dataid in (select dataid from dtree start with dataid=100325158 connect by prior dataid=abs(parentid))group by d1.parentid,d1.dataid, d1.name order by d1.parentid