- @echo off
- setlocal enabledelayedexpansion
- (for /f usebackq^ tokens^=1-2^ delims^=^" %%i in (`findstr /c:"is current directory" /c:"<DIR>" 1.txt`) do (
- if "%%j" neq "" (
- set "pre=%%j"
- ) else (
- for /f "tokens=3*" %%a in ("%%i") do (
- echo !pre!/%%b
- )
- )
- ))>2.txt
复制代码
|