It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I filter the Attachments macro by partial file name e.g. Fred*.PDF

This question is in reference to Atlassian Documentation: Attachments Macro

Suppose i have a set of 50 attachments with two types of file name structures:

Fred1.PDF   Fred2.PDF   Fred3.PDF .... Fred20.PDF

Mary1.PDF  Mary2.PDF   Mary3.PDF .... Mary30.PDF

Can I embed two versions of the Attachments macro (perhaps each in an Expand macro) and have them "filter" what is in the list e.g.  one for files as Fred*  and another for Mary*

I don't want to have to go through the list and add Labels to each file .. somewhat tedious!  :sad:

Note also this (as yet unanswered) question about the downloading selction from that filtered list

3 answers

1 accepted

0 votes
Answer accepted

Yes, you can use regex to filter what's shown in the Attachments macro.


Might do the trick.


And yes, you can have multiple Attachments macros on a page, each with its own regex-controlled list.


Setting the macro file name filter as    Mary*.*   works

Mary*.PDF does not work

still, it is a little disappointing that the filter doesn't apply to the Download All as per that other question I linked to

When I've had to have a specific collection in a download, I've created it myself, attached the .ZIP, created a hyperlink to download that .ZIP, and set the Attachments macro to NOT show the Download all button.

Very misleading description of what the Attachment macro does. It doesn't filter on anything but file extension. You cannot, for instance, as far as I can tell, search on all file with "Biz" in the name. Eg., FirstBizPlan, SecondBizPlan, etc.
Very dodgy or sloppy of Atlassian.

Have you tried *Biz*.*?

You can filter Attachments macro or Space Attachments macro with Table Filter macro: add free text filter for name (file) column and type in Fred.*PDF.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

283 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you