£aaa2.txt¤ÎÃæ¿È¤Ç¡ÖECHO ¤Ï <OFF> ¤Ç¤¹¡£¡×¤Îʸ»ú¤¬½Ð¤Ê¤¤¤è¤¦¤Ë¤·¤¿¤¤¤Î¤Ç¤¹¤¬
¤Ç¤¤Þ¤»¤ó¤Ç¤·¤ç¤¦¤«¡£
²¿Â´¡¢¤è¤í¤·¤¯¤ª´ê¤¤Ãפ·¤Þ¤¹¡£
¡aaa.txt¤ÎÃæ¿È
¢
¤É¤ó·ª ¤Ï¤Þ·ª ¤¤¤¬·ª
¢bat¥Õ¥¡¥¤¥ë¤ÎÃæ¿È
¢
@echo off for %%a in (*.txt) do ( set keyword=%%a ) set keyword=%keyword:.txt=% set beforestr=·ª set afterstr=¥°¥ê setlocal enabledelayedexpansion for /f "delims=" %%a in (!keyword!.txt) do ( set line=%%a echo !line:%beforestr%=%afterstr%! >> !keyword!2.txt ) endlocal del %keyword%.txt
£aaa2.txt¤ÎÃæ¿È¡¡¢«¡Ú¢¤Îbat¤ò¼Â¹Ô¤·¤¿·ë²Ì¡¢½ÐÎϤµ¤ì¤ë¥Õ¥¡¥¤¥ë¡Û
¤É¤ó¥°¥ê ECHO ¤Ï <OFF> ¤Ç¤¹¡£ ¤Ï¤Þ¥°¥ê ECHO ¤Ï <OFF> ¤Ç¤¹¡£ ¤¤¤¬¥°¥ê