Created
July 3, 2014 14:07
-
-
Save Intey/b4cbeb2971a1586a55f8 to your computer and use it in GitHub Desktop.
delete pattern from each file in current directory(recursively).
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 | |
echo %filePath% | |
Set "pattern=.paycrypt@gmail_com" | |
Set "replace=" | |
echo "replace" %replace% | |
echo "Pattern " %pattern% | |
for /f "usebackq tokens=* delims=" %%# in (`dir /b /S /A:-D`) Do ( | |
Set "File=%%~nx#" | |
ren "%%#" "!File:%pattern%=%replace%!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment