# Organize attachments by "groups" field

**URL:** <https://discourse.jabref.org/t/organize-attachments-by-groups-field/3101>\
**Category:** Help\
**Tags:** groups\
**Created:** [December 24, 2021, 6:16am UTC](https://discourse.jabref.org/t/organize-attachments-by-groups-field/3101 "2021-12-24T06:16:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://discourse.jabref.org/u/Alex)\
**Post date:** [December 24, 2021, 6:16am UTC](https://discourse.jabref.org/t/organize-attachments-by-groups-field/3101/1 "2021-12-24T06:16:38Z")

</div>

Hello,

I imported my Zotero library to JabRef and now I have such file structure:

```auto
library.bib
files/3010/Building Applications with Scala.pdf
files/3011/Introducing Play Framework.pdf
...

```

I want to use “groups” JabRef field as path to attachments (for sync with my e-reader), e.g.:

```auto
library.bib
files/Programming/Scala/Building Applications with Scala.pdf
files/Programming/PlayFramework/Introducing Play Framework.pdf
...

```

Can I achieve this structure with standard JabRef tools?

Thank you!

---

<div class="post-metadata">

**Author:** ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)\
**Post date:** [December 24, 2021, 1:04pm UTC](https://discourse.jabref.org/t/organize-attachments-by-groups-field/3101/2 "2021-12-24T13:04:24Z")

</div>

Hi, yes this is possible!

You can customize the file directory pattern and the file name pattern.  
The pattern syntax is using the same syntax as for the Citation Key:

> **[Customize the citation key generator](https://docs.jabref.org/setup/citationkeypatterns#citation-key-patterns)**

I wrote about using groups name in linked files pattern here : [The function of copy linked files to folder - #4 by Siedlerchr](https://discourse.jabref.org/t/the-function-of-copy-linked-files-to-folder/1957/4)

Happy Holidays  
Regards
