Free for PREMIUM members
for %%F in (*2012*.xls) do (
ECHO ren "%%~F" "!Name:2012=2013!"
Open in new window
set folder=C:\my folder\name
for /f "tokens=*" %%f in ('dir /b /a-d *2012*.xls') do (
echo Renaming %%f to !name!
ren "%%~f" "!name!"
Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!
Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.