CODE: [Copy to clipboard]
::将指定文件夹中的卡巴授权批量改名为“产品(KIS或KAV)-版本号-序列号.key”的格式,同时过滤掉重复的授权文件
::2008-03-03 By SunTB
@echo off&echo.
set /p keypath=请输入授权文件所在文件夹(直接回车默认为当前文件夹):
cd /d %keypath%
for /f "delims=." %%a in ('dir *.key/b') do (
for /f "tokens=3" %%i in ('more /s "%%a.key"^|findstr /i "Serial"') do (
for /f "tokens=3,4 delims=-. " %%x in ('more /s "%%a.key"^|findstr /i "Security Virus"') do (
if "%%x"=="Security" (if not "%%a"=="KIS%%y-%%i" (move /y "%%a.key" "KIS%%y-%%i.key"))
if "%%x"=="Virus" (if not "%%a"=="KAV%%y-%%i" (move /y "%%a.key" "KAV%%y-%%i.key"))
)
)
)
exit
[