Edlin: c (copy)

Copies a block of consecutive lines to one or more locations within the file in memory. You can copy this block as many times as necessary.

Syntax

[line1],[line2],line3,[count]c

Parameters

line1 : Specifies the first line you want to copy.

line2 : Specifies the last line you want to copy.

line3 : Required. Specifies the destination line before which you want to insert the specified block of lines.

count : Specifies the number of times you want to copy the block of lines.

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 line1 or line2, Edlin.exe copies only the current line. You must include the commas on the command line, even if you omit one or both of these parameters, and you must specify the destination line number.

If you omit the count parameter, Edlin.exe copies the lines one time only.

Renumbering lines

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

Overlapping line numbers

The line you specify for the line3 parameter cannot be part of the block of lines to be copied. If you overlap line numbers in this way, Edlin.exe cannot complete the copy operation and displays the following message:

Entry error

Examples

To copy lines 1 through 5 one time, beginning on line 6, type:

1,5,6c

Lines 6 through 10 become identical to lines 1 through 5.

To copy the current line to line 5, type:

,,5c

To see the error message that appears if you overlap line numbers, type:

3,20,15c

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



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