Renaming files in batch

August 19, 2010 at 00:41:08
Specs: Windows XP
I have a string of file names located in a folder and certain parts of the file name will change daily.

The file names will look like

bal687b101-12345.PDF
bal687b102-12345.PDF
bal687b103-12345.PDF

The 5 characters after the dash are variables that will change daily and be anything. I have just used 12345 as an example.

I have to rename them to include the current date as

bal687b101-date-12345.PDF
bal687b102-date-12345.PDF
bal687b103-date-12345.PDF

The next day files will come named as

bal687b101-82345.PDF
bal687b102-82345.PDF
bal687b103-82345.PDF

I have to rename them to include the next days date as

bal687b101-nextdate-82345.PDF
bal687b102-nextdate-82345.PDF
bal687b103-nextdate-82345.PDF

I have got the date renaming bit sorted but can’t keep the variable 12345 or 82345 whenever I run my batch file.

Any ideas.



See More: Renaming files in batch

Report •


#1
August 19, 2010 at 12:24:57
Not easy to fix your script without seeing it.


=====================================
Helping others achieve escape felicity

M2


Report •
Related Solutions


Ask Question