How to get list of attachments for a space
Asked by Dean Robinson:

Hi,

I want to get a list of all the attachments in a space and get it into a CSV/Excel format. The key information I am after is the file name and the page name to which it is attached. If I use the Space Attachments macro - it is the perfect information, but it is listing them in groups of 20 and when I have a few hundred, I am going to have to cut-paste it a bunch of times to get it into CSV/Excel/Table format.

I want the output of that macro but in a big single table. I have also tried using search syntax such as - type:attachment AND spacekey:Key - it creates the search list, but again, not sure how to get that into a CSV/Excel/Table format.

Any ideas/suggestions that would be out of the box without using add ons?


Answers:
author: Sayed Bares [ServiceRocket]
body: [@Dean Robinson](/t5/user/viewprofilepage/user-id/1113890) I think the following community thread answers your question:

<https://community.atlassian.com/t5/Answers-Developer-Questions/display-a-list-of-all-attachments-in-confluence/qaq-p/513384>

comments: author: Dean Robinson
body: Hi [@Sayed Bares \[ServiceRocket\]](/t5/user/viewprofilepage/user-id/1480984) - thanks for the response. I had actually located that article. It suggests a number of ways to get the list and I have include my own options 4 \& 5 below:

1. Space Admin \> Attachments - my problem with this solution is that it lists them in groups of 20. As I state in my question, I have a large number and want to get them into a table - so want to avoid having to cut-paste numerous times. I am going to be doing this on a regular basis, so it is not a once off effort.
2. Command Line Interface App - as mentioned in my question, trying to avoid apps
3. Database Query - as it is a repeat, I was hoping to avoid direct database query, but this would possibly work for me, but I will need to get our database admin to run it for me
4. Space Attachments macro - does the same as 1 above, pages on groups of 20
5. Content by Label macro - At the moment I am looking at the option of labelling all the attachments I am interested in and using the content by label macro, as I can set the maximum number of pages very high in the macro settings and get what I want. Just means I have to go through and label all my files - lots of them! I don't have the option with the Space Attachments macro in option 4 above to set the maximum number of pages like I can with content by label - doh!! :(

So - was hoping there is an option that would avoid apps/database query and give me a full list without paging at 20.

Let us know any other ideas, otherwise - I will go with either the database query or my option 5 above.

Cheers


author: Robby Holtmann_IntraFind Software AG_
body: Hi [@Dean Robinson](/t5/user/viewprofilepage/user-id/1113890)

this is one of many features of our app "iFinder Confluence Search".

If you and your colleagues are also interested in a much better Confluence search, your CSV requirement is also solved with this.

Here is how it works: Define your filters, go to CSV-export and define the metadate fields for CSV, export the search result list.

![CSV Export1.png](https://community.atlassian.com/t5/image/serverpage/image-id/271836i6C9A8471649E2A60/image-size/large?v=v2&px=999 "CSV Export1.png")

![CSV Export2.png](https://community.atlassian.com/t5/image/serverpage/image-id/271837i4D8B566FC6AF61FE/image-size/large?v=v2&px=999 "CSV Export2.png")

So, if you interested anyway on a high qualtiy search solution for Confluence, [iFinder Confluence Search](https://marketplace.atlassian.com/apps/1220508/ifinder-confluence-search?hosting=server&tab=overview) is available at Atlassian Marketplace.

It helps even the Confluence user without expert knowledge to search quite intuitively.

This enterprise search solution delivers top results based on linguistic analysis and offers many additional features.

These articles may help you:

? [iFinder Confluence Search](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Enterprise-Search-for-Confluence/ba-p/1584172)

? [iFinder Search Macro](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/iFinder-Search-Macro-for-Confluence/ba-p/1717979)

Let me know, if you need further information or like to get a demo first.

Best

Robby


author: Rodrigo
body: Good day [@Dean Robinson](/t5/user/viewprofilepage/user-id/1113890),

Our team also saw the need to track and identify attachments and created the Attachment Report within [Viewtracker](https://marketplace.atlassian.com/apps/28637/viewtracker-analytics-for-confluence?tab=overview&hosting=datacenter).

This report provides information on how many attachments are in your instance and allows you to filter them by: date name, views, space, file size, unique viewers... and many more!

* [Viewtracker - Attachment Report](https://bitvoodoo-apps.atlassian.net/wiki/spaces/BVVIEWTRACKER/pages/12038406145/Attachment+Report)

As well as the possibility of exporting[them](https://bitvoodoo-apps.atlassian.net/wiki/spaces/BVVIEWTRACKER/pages/10523345299/Export+Viewtracker+DC+Server+Data) in CSV form for further analysis in your preferred spreadsheet software.

We hope this is helpful and are always open to feedback :)

With friendly regards  
Rodrigo


Tags: confluence-server

server