Trương Phượng
New member
How do you count lines in CMD?
Answer
Use FIND command to count file lines, store line count into a variable. Running the FIND command with option /c will output the line count only. The FOR command with option /f will parse the output, the line count in this case, and the set command put the line number into the cnt variable.
Answer
Use FIND command to count file lines, store line count into a variable. Running the FIND command with option /c will output the line count only. The FOR command with option /f will parse the output, the line count in this case, and the set command put the line number into the cnt variable.