Counting files in DOCBASE

rvalenzuela
edited January 7, 2009 in Documentum #1

I've created a tree structure of folder inside a cabinet to organize a huge amount of files I needed to upload.

Now I need to do crosscheck that the files I had in my folders correspond to the ones I needed to upload. Primarily there are document types that I can use but I'd like to do something like:

select doctype, folder, count(*) from whoknowswhere

group by doctype, folder

There could be some errors caused by duplicate files.

I did experience an interruption on the load process which made me purge from the XML file those that already had been loaded, I might have made some bad decisions here.

By the way every folder represents a box so if I count then I could most probably identify where's the problem.

DQL is the answer? are there other tools for this?

Regards

Comments

  • msroth
    edited January 5, 2009 #2

    Ruben,

    You might try something like this:

    select r_folder_path as fldr, r_link_cnt as cnt from dm_folder where i_cabinet_id in (select r_object_id from dm_cabinet) order by r_folder_path

    Here is an example of the results:

    fldr                                                                   cnt

    -------------------------------------------- -----

    /Folder 1                                                        3

    /Folder 1/FY 2007                                       1

    /Folder 1/FY 2007/2006-12-13               1

    /Folder 1/FY 2008                                       2

    /Folder 1/FY 2008/2008-2-5                    1

    /Folder 1/FY 2008/2008-4-13                 2

    /Folder 1/FY 2009                                       0

    /Integration                                                 1

    /Integration/Esignature                          1

    /Integration/Esignature/Templates  1

    /Resources                                                   79

    You can also write a little Java/DFC code to do some recursive queries if you need more/other info that DQL can't provide.  I have some exaples of this also if you need them.

  • rvalenzuela
    edited January 6, 2009 #3

    Thanks Scott,

    It did work for me, I'm doing some further reading to customize my queries to CS.

    Regards.

  • Chris_Campbell
    edited January 7, 2009 #4

    This is also one of those times where the Find tool in Documentum Desktop is just perfect for building queries for this type of thing.  Not only that, it can spit the results out to a CSV file if needed.  Sure you can type it all out, but for the lazy administrator (or the smart administrator looking to save time) I can create a fairly complicated search query in just a few seconds.

  • msroth
    edited January 7, 2009 #5

    Good point Chris!  Ah, the days of the Desktop Client....  I miss them.  :-)