本帖最后由 aloha20200628 于 2024-12-23 23:15 编辑
回复 9# 304802301 - @echo off &set "p=z:\a-处理后"
- for %%a in (
- "z:\a;1.txt", "z:\a;2.txt"
- ) do for /f "tokens=1* delims=;" %%x in (%%a) do (cd /d "%%x" &7z a "%p%\%%~ny.rar" %%y)
- for %%a in (
- "z:\a\b;f202412220329.txt f202412230255.txt",
- "z:\a\c;texk12号.pdf",
- "z:\a\d;2021年汇总.pdf 2022年汇总.pdf 2023年汇总.pdf"
- ) do for /f "tokens=1* delims=;" %%x in (%%a) do (cd /d "%%x" &7z a "%p%\%%~nx.rar" %%y)
- pause&exit/b
复制代码
|