2 réponses
Hello.
Try this:
By putting your own path for the file
In summary:
- you skip the previous lines with skip (here line n°1)
- you retrieve the next line (line n°2)
- then you exit the for loop (with the goto) to display the content of the line, declared previously.
++
As a wise man once told me: "in France, we have the right to do anything....
You just have to not get caught."
Try this:
@echo off set nb=2 set /a N=%nb%-1 set file="c:\users\thomas\desktop\test.txt" for /F "skip=%N% delims=" %%i in ('Type "%file%"') do set "var=%%i" & goto suivant :suivant echo %var% pause By putting your own path for the file
In summary:
- you skip the previous lines with skip (here line n°1)
- you retrieve the next line (line n°2)
- then you exit the for loop (with the goto) to display the content of the line, declared previously.
++
As a wise man once told me: "in France, we have the right to do anything....
You just have to not get caught."