View Single Post
 
Old 02-29-2016, 09:34 PM
Dave T Dave T is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default Batch add suffix to PDF files in folder

Hello All,

I am after a *.bat file that will add some specific text before the .PDF extension.

For example I have hundreds of PDF's in a folder with different names, that look similar to the following:
PN00001.pdf
PN00123.pdf
PN00234.pdf

I would like to change them to by adding a ' - Calculations' suffix:
PN00001 - Calculations.pdf
PN00123 - Calculations.pdf
PN00234 - Calculations.pdf

I have previously used a bat file to create a text file of all the files with the folder it is run from and am hoping the PDF suffix file can be placed in a specific folder and only rename these PDF's that are within that folder.

Code:
dir /a /b /-p /o:gen >C:\WINDOWS\Temp\file_list.txt
start notepad C:\WINDOWS\Temp\file_list.txt
Any suggestions appreciated.

Regards,
Dave T
Reply With Quote