# How to rename pdfs replacing space and hyphens with underscores

**URL:** <https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407>\
**Category:** Help\
**Created:** [November 5, 2018, 4:49am UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407 "2018-11-05T04:49:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirk](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@kirk](https://discourse.jabref.org/u/kirk)\
**Post date:** [November 5, 2018, 4:49am UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407/1 "2018-11-05T04:49:13Z")

</div>

Hi folks. Thanks for providing jabref.  
I have a question regarding renaming pdfs since I’ve looked into all possible ui options in jabref but I’m still unsure how to achieve this.

Let’s say that we have a bib entry with a pdf file linked to it and the title of the entry is something like this:

```auto
Some Efficient-Weird (Un)Usable Method

```

I would like to rename the pdb according to the schema of [author][year]\_[title]  
but the title should be reformatted as

```auto
Some_Efficient_Weird_(Un)Usable_Method

```

Is that possible through jabref?  
How can I achieve that?

---

<div class="post-metadata">

**Author:** ![tobiasdiez](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/tobiasdiez/32/340_2.png) [@tobiasdiez](https://discourse.jabref.org/u/tobiasdiez)\
**Post date:** [November 5, 2018, 6:08pm UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407/2 "2018-11-05T18:08:11Z")

</div>

That’s not possible at the moment. Using `[title:camel]` gives you

```auto
SomeEfficientWeird(Un)UsableMethod

```

which is relatively close to what you want.

---

<div class="post-metadata">

**Author:** ![kirk](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@kirk](https://discourse.jabref.org/u/kirk)\
**Post date:** [November 16, 2018, 1:07am UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407/3 "2018-11-16T01:07:45Z")

</div>

Thanks, that’s really a bummer, since there’s also no option for additional plugins because you guys removed that as well, at least in that way some third party dev would have added some additional functionality which atm is lacking.

---

<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:** [November 19, 2018, 12:54pm UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407/4 "2018-11-19T12:54:24Z")

</div>

You could try to use the Regex, maybe that helps

---

<div class="post-metadata">

**Author:** ![tobiasdiez](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/tobiasdiez/32/340_2.png) [@tobiasdiez](https://discourse.jabref.org/u/tobiasdiez)\
**Post date:** [November 19, 2018, 7:20pm UTC](https://discourse.jabref.org/t/how-to-rename-pdfs-replacing-space-and-hyphens-with-underscores/1407/5 "2018-11-19T19:20:08Z")

</div>

@kirk JabRef is completely open source. So if you can code (or know somebody who can), then it easy for you to contribute a formatter that fits your requirements. For details: [https://github.com/JabRef/jabref/blob/master/CONTRIBUTING.md](https://github.com/JabRef/jabref/blob/master/CONTRIBUTING.md)
