M
M
Magi2012-08-23 09:06:23
Command line
Magi, 2012-08-23 09:06:23

Batch rename pdf based on data from Title of pdf file itself?

As a result of recovering pdf files after a crash, more than 100,000 pdf files with names consisting of numbers appeared on the disk.
pdfinfo from the xpdf package gives the following information about such files
pdfinfo 121324235245.pdf
Title: 6211-I1 ADSL2+ Router Command Line Interface User's Guide
Author: Zhone Technologies, Inc.
Creator: Acrobat PDFMaker 6.0 for Word
Producer: Acrobat Distiller 6.0.1 (Windows)
CreationDate: 03/02/06 15:32:25
ModDate: 03/02/06 15:35:17
Tagged: no
Form: none
Pages: 6
Encrypted: no
Page size: 612 x 792 pts (letter)
File size: 141317 bytes
Optimized: yes
PDF version: 1.6
Title can be used in the file name.
Please tell me how the batch file for Windows 7 will look like to rename a pdf file if the Title is full and leave it as it is if the Title is empty?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Iliapan, 2012-08-24
@Iliapan

Hmm... well let's start simple :)

pdfinfo.exe "C:\file.pdf" | findstr "Title"

Will give us a string with a name.

M
Magi, 2012-08-24
@Magi

I've just been at the computer all day today. Thank you! I'll try later and let you know the results!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question