I have many Unlinked attachments in the repositories that I want to delete.
Is there a way to delete them in bulk.
Hi Guan Hua Chee,
You would not want to delete attachments because if they are being referenced by a ticket, then it will leave dangling references in the database (records pointing to another record that no longer exists). We highly recommend using the ticket archive/purge functionality to maintain your ticket data, and attachments. The archive and purge functionality wont purge attachments that are referenced by tickets or other objects. For info on using Archive and Purge see this section of the documentation: How to Archive and Purge Historical Data - CA Service Management - 14.1 - CA Technologies Documentation
The Unlinked attachment are the sample data from SDM $NX_ROOT\samples\data and some sample knowledge document I created.
The Unlinked attachement was unclear so I uploaded the better one and link them to the knowledge document. Afterwards I decided to do a cleanup. I did not unpublish the unwanted documents and SDM samples data. I just delete the whole Category folders. I ran all OOTB kt archive and purge rules many times. But it still shows Unlinked attachement in the repositories.
Is it some step I did that cause the Unlinked attachements still present in repositories when I did a search as screen capture in my question ?
I think I found my workaround. when I ask another question on filtering Unlinked attachments.
How can I filter all Unlinked values in search attachment node, list_attmnt.htmpl, Attach To, column
I have also included addition properties file_name in the expansion column in the list_attmnt.htmpl.
This way if I delete a whole categories and ran the Archive and Purge rules it will purge the Unlinked entries from the list_attmnt views.
Then I can export the file_name and run a batch file to delete file with names that are not in the list exported in the repositories physical path.