显示指定行的内容
显示指定行的内容 出处:http://www.cn-dos.net/forum/viewthread.php?tid=21647 This page shows how to read specific lines from a text file. There are many ways to have the for /f command read the input file, for instance:- for /f "delims=" %%a in (input.txt) do ... for /f "delims=" %%a in ('type input.txt') do ... for /f "delims=" %%a in ('more ^< input.txt') do ... However, only the last method (using the more command) will give consistent results across Windows NT, 2000, XP and 2003. The first method does not recognise unicode files. Also, the usebackq switch must be used if the input filename contains