Edlin: w (write)

Writes the first portion of the edited file from memory to a disk. Used without parameters, w writes lines from the edited file in memory to a disk until memory is 25 percent full.

Syntax

[n]w

Parameters

n : Specifies the number of lines that you want to write to the disk, beginning with the first line of the edited file in memory.

? : 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. 

When you start Edlin.exe, it reads as many lines as possible from your disk file into memory. If the size of your file exceeds available memory, you must edit your file in stages. That is, you edit part of the file, write that part to your disk by using the w subcommand, and then load the next part from disk by using the a (append) subcommand.

When you open a file, Edlin.exe reads lines from the disk until memory is more than 75 percent full. Edlin.exe reserves the other 25 percent for changes you make to the text. If your entire file fits in memory, Edlin.exe displays the following message:

End of input file

If you see this message, you do not need to use the w and a (append) subcommands.

If Edlin.exe does not display this message when you open a file, the size of the file exceeds available memory. You must edit your file in stages by using the w and a commands to write and read parts of the file, respectively.

The w subcommand does not write the changes you make to disk unless it is actually necessary to use w. If you use w even though the whole file fits into memory and then you use q (quit) to quit edlin, none of the changes you made are saved.

Renumbering lines

After edlin writes the first portion of the edited file from memory to a disk, use the l (list) subcommand at the * prompt to see the correctly renumbered lines that remain, beginning with line number 1.

Examples

In this example, the final 100 lines of your disk file do not fit into memory. To free up enough space to load the remainder of your disk file into memory and continue editing, type:

125w

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

Edlin: a (append)

Edlin: q (quit)

Command-line reference A-Z



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