Created
June 6, 2024 06:58
-
-
Save bdonvr/8d27ab76650b07c72f180158cef5adf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
:: Get today's date in DD-MM-YYYY format | |
for /f "tokens=1-3 delims=/" %%a in ('date /t') do ( | |
set _day=%%a | |
set _month=%%b | |
set _year=%%c | |
) | |
:: Rename files containing 'FDD' or 'MP' | |
for %%i in (*FDD*.*) do ren "%%i" "8851 FDD !_day!-!_month!-!_year!.xlsx" | |
for %%i in (*MP*.*) do ren "%%i" "8851 MP !_day!-!_month!-!_year!.xlsx" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment