Batch file to rename files

September 10, 2011 at 10:12:01
Specs: Windows Vista
I want to create a batch file to rename part of file name. So for example I have file name 'ABC Summer Term 2011.xls', 'DEF Summer Term 2011.xls' and etc. Which I want the batch to amend the year from 2011 to 2012.

See More: Batch file to rename files

Report •

September 12, 2011 at 05:29:54
Did you mean to say that your file names currently look like 'ABC Summer Term.xls', but you want the batch to rename them as 'ABC Summer Term 2011.xls'?

Report •

September 12, 2011 at 11:26:51
No we have files with customer names followed by the term i.e. summer term and then the year. I want the batch file to simply change the year for example ABC Summer Term 2011.xls to ABC Summer Term 2012.xls.

Report •

September 12, 2011 at 11:37:33
You should be able to just cd into the directory and then do a rename at a command prompt like this:

cd c:\directory

ren *2011.xls *2012.xls

It shouldn't require a batch file.

Report •

Related Solutions

Ask Question