Home > Commands A-M > Commands E


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

A line editor to create or modify text files. This command is now used rarely, if ever.

Loads the file into memory and waits for you to enter commands.


EDLIN [[drive:][path]filename] [/B]

drive: (v1.0 NT3.5)
Specifies the location of an ASCII text file.
path (v2.0 NT3.5)
Specifies the location of an ASCII text file.
filename (v1.0 NT3.5)
Specifies the name of an ASCII text file. If the file does not exist, DOS Editor creates it. If the file exists, DOS Editor opens it and displays its contents on the screen.

/B (v1.0 NT3.5)
Read the file without stopping at any CTRL-Z (1A hex) aka END-OF-TEXT-FILE characters in the file.


Replaced by the Edit/QBASIC.EXE full-screen editor. v5.0

Special features
How to embed control characters

Use CTRL-V to embed any ASCII control code into the text. For instance, use ^VA to input a CTRL-A (^A) character into a file. To embed the ESC character, use ^V[. This allows you to write batch files for accessing printer modes and for setting values used by the ANSI.SYS extended console driver.

How much file is read into memory?

Edlin reads as much of the file as will fit into 75% of available memory. Use the (W)rite and (A)ppend commands to save changes and read more of the file.

Edlin commands

lnX line number (1 thru 65529 decimal)
. current line
# for the last line of the file +1
-NNNN or +NNNN for lines relative to the current line.

Optional line numbers, when omitted, are assumed to be the current line.

Command                Function
?                        List commands. Added in v5.0
ENTER                    Save the changes on the currently-visible line
                         and start editing the next line.
[ln1]                    Edit line LN1
                         (just press Enter to edit current line)
[nnn] A                  Append. Reads "nnn" lines from the file
                         (for large files)
[ln1],[ln2],ln3,[nnn] C  Copy lines LN1 thru LN2 to LN3.
                         Repeat "nnn" times.

[ln1],[ln2] D            Delete lines from LN1 thru LN2
E                        Exit. Saves the changes to the file.
[ln1] I                  Insert lines starting at LN1.
                         CTRL+BREAK (^BREAK) to stop
[ln1],[ln2] L            List lines LN1 thru LN2 or 23 lines starting
                         at LN1
[ln1],[ln2],ln3 M        Move lines LN1 thru LN2 to start at line LN3

[ln1],[ln2] P            list a Page (23 lines). Changes "current line"
Q                        Quit. Exit without saving changes.
[ln1],[ln2] [?]R[str1][<F6>str2] Replace text in lines LN1 thru LN2.
                         String STR1 is replaced with STR2.
                         ? prompts before each.
                         Note: <F6> is the same as CTRL-Z (^Z)
[ln1],[ln2] [?]S[str1]   Search for string STR1 in lines LN1 thru LN2.
                         ? repeats
[ln1] T:[d:]filename     Transfer (merge into memory) a file, starting
                         at LN1

[nnn] W                  Write "nnn" lines to file (use before Append)
Command                Function





v1.0 v1.05 v1.1 v1.11 v1.24 v1.25 v1.85 v2.0 v2.01 v2.05 v2.10 v2.11 v2.11R v2.12 v2.2 v2.25 v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02
Windows NT
NT3.5 NT4 NT2000