Command Prompt for Windows




Command READLN

Function:

Read a line of text from a file. The line of text is stored in an environment variable called READLN.

Syntax:

READLN [drive:][path]filename [linenum]
filenameSpecifies the text file to read.
linenumSpecifies the line number to retrieve.

Note:

Line numbers start from 1.

When parameter linenum is not specified then the environment variable will be set to the total number of lines in the text file.

Example on using READLN.

Also see Batch Files.