Reputation: 93
I am very new Alfresco user. We have uploaded 18000 documents to Alfresco. Then we noticed that some categories are not correct. We would like to upload them again, but we don't know how to delete existing documents. Is there any way to delete all documents that were uploaded yesterday?
Upvotes: 1
Views: 3521
Reputation: 1703
I would use the WebDAV to delete that.
First, from a window running PC. I would add a network place for the webDAV of alfresco.
Then from Window explorer, I will delete very easily like as deleting folders/files in window.
You can google for webDAV api URL to add.
Upvotes: 0
Reputation: 1298
The best way is to use a code based method (JavaScript or CMIS). So, the easiest way is to create a JavaScript file in Data Dictionary/Script folder with something like this:
// execute a lucene search across the repository for pdf documents in a specific folder created the exact day
var docs = search.luceneSearch("PATH:\"/app:company_home/cm:myFolder//*\" AND @cm\\:content.mimetype:\"application/pdf\" AND @cm\\:created:2013-05-21");
var i;
for (i=0; i<docs.length; i++)
{
docs[i].remove();
}
although 18k documents could probably create some memory issues in your JVM.
Maybe the script will interrupt at some point, and you'll have to restart the machine and execute script again.
Upvotes: 6