set var=1
for /f "skip=%var% tokens=*" %%a in (any.txt) do (echo %%a)
works fine.
But when,
set var=0
for /f "skip=%var% tokens=*" %%a in (any.txt) do (echo %%a)
won't work. My purpose is to skip line 0 (which means don't skip).
Error: tokens=*"
was unexpected at this time.
Is there any ways to make it work?
set /P var="Enter number of lines to skip: "
if %var% gtr 0 (set "skip=skip=%var% ") else (set "skip=")
for /f "%skip%tokens=*" %%a in (any.txt) do (echo %%a)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다