Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there something I can use that renames PDF files according to their content? Basically an equivalent of in Ubuntu.

share|improve this question
up vote 4 down vote accepted

If you are comfortable with python you could use the script on I have just tested the scripts he provides (for a start, you can pip install pdfminer) and they work nicely. The result they give is something along the lines of:

[{'ModDate': "D:20050422142709+02'00'", 'CreationDate': "D:20050422142709+02'00'", 'Producer': 'Mac OS X 10.3.8 Quartz PDFContext', 'Creator': 'Word'}]

That output you could use to rename your files.

share|improve this answer
I have actually assumed thus far that you mean metadata with content (based on your link). There is also a good tool for academic information retrieval available. It is called pdfmeat. – don.joey Mar 12 '13 at 14:14

There is another alternative. You could sudo apt-get install pdftk. With that library you can run a command like pdftk myfile.pdf dump_data which results in something in a set of info and value:

InfoKey: Creator
InfoValue: Word
InfoKey: Producer
InfoValue: Mac OS X 10.3.8 Quartz PDFContext
InfoKey: ModDate
InfoValue: D:20050422142709+02'00'
InfoKey: CreationDate
InfoValue: D:20050422142709+02'00'
PdfID0: d7af25c8df737276d8d6b5de49d94d92
PdfID1: d7af25c8df737276d8d6b5de49d94d92
NumberOfPages: 58

Again you could use that information in a renaming script. If feel the latter is something best customized because it depends on whether you just want the title, title-author, or something else.


share|improve this answer

This is very easy to achieve with exiftool.

For instance, the following command would rename all files in the current directory to <title>.extension:

exiftool '-filename<$title.%e' .

You can install exiftool on Ubuntu with:

sudo apt-get install libimage-exiftool-perl

Please consult the official documentation for more information:

share|improve this answer

If you're looking for an out-of-the-box solution and your PDFs are academic in nature, you might try Zotero, the Firefox plugin.

Unfortunately this takes several steps to do, each of which can be a bit slow if you are trying to work with a lot of PDFs at once:

  1. Drag and drop your PDFs into Zotero.
  2. Right-click them to retrieve the metadata (and automatically download the bibliographic information).
  3. If the files were recognized correctly, right-click them again to automatically rename.
  4. Export or directly move the renamed files where you want them.

The answer to a similar question on Superusers shows how to do the same thing using Mendeley. In Zotero this process can be further automated using Zotfile. Finally, here is an extensive list of potentially useful tools along these lines.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.