cancel
Showing results for 
Search instead for 
Did you mean: 

Reporting the full folder structure, with number of docs in each folder

ultimatebiker
Champ in-the-making
Champ in-the-making
I need to create a report that will extract from my existing installation of Alfresco (4.0.0 Community Edition):

- The full folder structure / hierarchy

- For each folder, the number of files and optionally other useful stats if possible (size of the folder, list of file names, etc.)

What is the best way of achieving this?

Thank you!
5 REPLIES 5

mitpatoliya
Star Collaborator
Star Collaborator
Create simple script or webscript which will traverse through your folder hierarchy read all information and generate file based on that information in alfresco repository.

romschn
Star Collaborator
Star Collaborator
There is an alternate way if you require information in XML format. You can export ACP of the folder for which you require detail and inside the generated ACP, it contains the XML file mentioning the whole folder hierarchy and contents inside it along with its properties. If you want to generate some User readable report then it will require to parse the XML and fetch the details to show appropriately. You can take a look at import ACP functionality to get understanding of it.

The approach mentioned by Mits will just require to create a webscript, while the one i mentioned requires bit of a processing but mentioned it over here as i think that it is also an alternate way to get this done.



ultimatebiker
Champ in-the-making
Champ in-the-making
Thanks, but even though I am a developer and would definitely be able to implement these solutions, I am an Alfresco beginner and I need a bit more details on these two solutions:

- Where do I start to create a script or a web script, or an ACP?

- Is there any example of directory traversal available? I am probably not the first person who wants to do this, right?

Ah, and my requirements became a bit clearer today. In each directory I will need to compute:
1) The number of files
2) The total size of the files in the folder
3) The total number of PAGES, from all the files in the folder

If anyone has any tip on how to do this, I'd be very grateful!

Thanks

romschn
Star Collaborator
Star Collaborator
You may probably want to go with webscript option. Refer this link which will help you o get understanding about webscripts in alfresco - http://ecmarchitect.com/alfresco-developer-series-tutorials/webscripts/tutorial/tutorial.html

ultimatebiker
Champ in-the-making
Champ in-the-making
OK, thank you for your help Ramesh!