Edlin: d (delete)

Deletes the block of consecutive lines you specify. Used without parameters, d deletes the current line.

Syntax

[line1][,line2]d

Parameters

line1 : Specifies the first line you want Edlin.exe to delete.

line2 : Specifies the last line you want Edlin.exe to delete.

?: Displays a list of edlin subcommands.

Remarks

Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files. 

This tool is not available on Windows XP 64-Bit Edition. 

Omitting parameter values

If you omit both parameters or the line2 parameter only, Edlin.exe deletes the current line. However, if you omit the line1 parameter only, Edlin.exe deletes the block of text that includes the current line through the line specified by line2. In the latter case, you cannot specify a line number for line2 that precedes the current line number. The number you specify for line2 cannot be smaller than the number you specify for line1. If you omit the line1 parameter only, you need to insert a comma as a placeholder preceding line2, as shown under Syntax.

Renumbering lines

After Edlin.exe deletes lines, you can use the l (list) subcommand at the * prompt to see the correctly renumbered lines that remain.

Examples

To delete line 7, type:

7d

To delete the block of text on lines 22 through 32, type:

22,32d

In this example, the number of the current line is 7. To delete the block of text that includes the current line through line 11, type:

,11d

Formatting legend

FormatMeaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Edlin

Edlin subcommands

Command-line reference A-Z



© 2014 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies