You are not very specific as to what patterns exist and what rules to follow. Regardless, my JREN.BAT hybrid JScript/batch utility should be able to easily and quickly meet your needs. JREN.BAT renames files via regular expression replacement. It is pure script that runs natively on any Windows machine from XP onward.
I'll assume you want to rename all .xlsx files that have 6 digits immediately before the extension. If this is the case, then the old date doesn't really matter - you can simply rename all files that meet the pattern to use today's date:
@call jren "\d{6}(?=\.xlsx$)" "ts({fmt:'{mm}{dd}{yy}'})" /i /j
If there are files that meet the pattern, yet should not be renamed because they contain the wrong date, then you can simply supply the target old date as an argument and substitute it for the old 6 digit mask:
@call jren "%1(?=\.xlsx$)" "ts({fmt:'{mm}{dd}{yy}'})" /i /j
If the above script were named fixDate.bat, then you would use fixDate 030315
from the command line.
If you want to compute the old date, then you can throw in my getTimestamp.bat hybrid utility and use the following batch script.
@echo off
setlocal
call getTimestamp /f "{w}" /r dayOfWeek
set "offset=-1"
if %dayOfWeek% equ 1 then set "offset=-3"
call getTimestamp /od %offset% /f "{mm}{dd}{yy}" /r oldDay
call jren "%oldDay%(?=\.xlsx$)" "ts({fmt:'{mm}{dd}{yy}'})" /i /j
No matter what your exact requirements, you should be able to use these two utilities to meet your needs. Both utilities are extremely flexible with many options. Help can be obtained from the command line using:
jren /?
getTimestamp /?
You might want to pipe the help through MORE so you can read each line before it scrolls off the screen. I have my console configured to have a large buffer so I can scroll to see prior lines of output, so I don't need MORE.
jren /? | more
getTimestamp /? | more