cancel
Showing results for 
Search instead for 
Did you mean: 

how to find information inside the zip file in alfresco-4.2.2 version

chaituu
Champ in-the-making
Champ in-the-making
Hi,

We are using alfresco-4.2.2 version.we have uploaded the zip files.Let's say we have uploaded test.zip. I want to know zip file information like how many files inside the zip file.when i search forms its saying the files will be stored in C:\Alfresco\alf_data\contentstore path and stored in .bin format and couldn't find the zip file that have uploaded.Is there any way to find this information?



2 REPLIES 2

gravitonian
Star Collaborator
Star Collaborator
Hi,

What is your use-case? I will assume something like this:

1) You want to search for zip files based on metadata such as number of files, size etc
2) You want to process the zip after it has been uploaded and you need to know the number of files in it

So when you upload a ZIP file it is stored in the file system in the contentstore directory as you say, it is store with the extension .bin and a UUID name. If you know the UUID you can just change the .bin to .zip and you have your ZIP file, it is not stored in an encrypted format. For information about the Repository concepts see: http://docs.alfresco.com/5.1/concepts/dev-repository-concepts.html.

Now, if you want to search on more than zip file name and size, then you need to develop and install an extra Metadata Extractor. Let's say you want to be able to search on number of files in the zip, then you can implement a Metadata extractor (see http://docs.alfresco.com/5.1/references/dev-extension-points-custom-metadata-extractor.html) that uses the Java class ZipFile to get the size, meaning you get number of files and directories in the zip. You can then set an extra property on the ZIP node when it is uploaded to keep the number of files information, and you can then search on it. For this you will need an extra Aspect and property to keep the number of files information (see http://docs.alfresco.com/5.1/references/dev-extension-points-content-model.html)

chaituu
Champ in-the-making
Champ in-the-making
Thanks for the reply.our use case is I need to write a utility to find out the no of files(count) inside zip,name of the zip file in all the zip files present in the repository.I need to share the report which shows each zip file is having files count.