Software >> OS >> Windows >> Command Line >> How to use FOR command to process each file matching a pattern and rename with a prefixExample we want to loop through all files matching p????.gif and add a prefix 2010- for /F %%a in ('dir /b p????.gif') do rename %a 2010-%%a
Note:
|