Last active
March 10, 2019 12:17
-
-
Save ezhov-da/d9010ae4e2d31c783071fa9ec8ad5647 to your computer and use it in GitHub Desktop.
bat recursive rename file
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
rem https://webhamster.ru/mytetrashare/index/mtb0/1342095633ebdvvkp6ch | |
@echo off | |
rem====================================================== | |
set SOURCE_FOLDER=%~dp0 | |
set EXT_FROM_SEARCH=*.js | |
set EXT_TO_RENAME=.wpcs | |
rem====================================================== | |
echo ^> start execute in catalog: %~dp0 | |
echo ^> folder for check: %SOURCE_FOLDER% | |
echo ^> extension from: [%EXT_FROM_SEARCH%] extension to: [%EXT_TO_RENAME%] | |
echo. | |
For /R %SOURCE_FOLDER% %%G IN (%EXT_FROM_SEARCH%) do ( | |
echo ^> rename: %%G | |
echo ^> to: %%~nG%EXT_TO_RENAME% | |
ren %%G %%~nG%EXT_TO_RENAME% | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment