10# mengpm
第三点暂时没有办法,加入第一点和第二点内容如下- @Echo Off&SetLocal EnableDelayedExpansion
- If NOT Exist temp Md temp
- Set "RpStr=原内容1-现在内容1 原内容2-现在内容2 原内容3-现在内容3 原内容4-现在内容4"
- For /F tokens^=2delims^=^" %%A In ('Ftype winrar') Do Set "Mrar=%%A"
- For /F "delims=" %%A IN ('Dir /a-d /b /s *.rar') Do (
- "%Mrar%" x "%~dp0\%%A" "%~dp0\temp"
- Del "%~dp0\%%A"
- For /R temp %%I IN (*.txt) Do (
- (For /F "Usebackq Delims=" %%J IN ("%%I") Do (
- Set "Str=%%J"
- For %%K In ("%RpStr%") Do (
- For /F "tokens=1,2 delims=-" %%L In ("%%K") Do Set "Str=!Str:%%L=%%M!"
- )
- Echo,!Str!
- ))>"%%~dpI\tem"
- Move "%%~dpI\tem" "%%I"
- "%Mrar%" a -ep -dw "%~dp0\%%A" "%%I"
- )
- )
- Rd temp
复制代码
|