回复 16# qixiaobin0715
谢谢大佬指点!昨天在写代码的时候想用到 skip=!n!,发现失败,今天通过搜索找到的这个帖子。
- @echo off
- set n=1
- setlocal enabledelayedexpansion
- for /f "delims=" %%b in ("=") do (
- cmd /q /c "for /f "skip=!n! delims=%%b" %%a in ('type "%~f0"') do echo %%a"
- )
- pause
复制代码
- @echo off
- for /d %%d in (*) do (
- cmd /q /c "for /r "%%d" %%i in (*) do echo %%i"
- )
- pause
复制代码
|