Search

Want to make a suggestion on how to improve this guide? Feedback (do not use to
ask questions; instead use the Search box above).

MS-DOS Commands :: edit (MS-DOS Editor)

Overview:

Note: If Windows is running then use notepad instead since it is easier to use than edit. See: notepad.

Type edit at the command prompt and the MS-DOS text editor program will be run. The editor is a text editor that uses a simplistic window and menu system inside an MS-DOS window.

Even though the edit program was designed for MS-DOS (a text based environment), it does recognize the mouse. You can use the mouse to select commands and to move the cursor (which appears as an underline). Although the program is archaic compared to today's interface standards, anyone familiar with Windows should be able to use the program.

Since the edit program was originally designed for use in the text based user interface of MS-DOS rather than in the graphic interface of modern computers, the window automatically resizes to 80-characters wide. The window is locked at this size and cannot be resized. If you view a file that has lines wider than 78 characters (2 characters are used for the "border"), you can scroll horizontally by using the left/right/Home/End arrow keys. Unfortunately, there is no horizontal scroll bar. There is a vertical scroll bar and you can use the up/down/PgUp/PgDown arrow keys.

Menus:

The edit program has menus similar to what appear in modern Windows programs:

File: New, Open..., Save, Save As..., Close, Print..., Exit

Edit: Cut, Copy, Paste, Clear

Search: Find..., Repeat Last Find, Replace...

View: Split Window, Size Window, Close Window

Options: Settings..., Colors...

Help: Commands..., About...

Commands can be selected by the mouse or by keyboard. As with a modern Windows application, menus can be accessed by keyboard by pressing the Alt key and the first letter of the menu title (i.e.: Alt-F, Alt-E, Alt-S, Alt-V, Alt-O, Alt-H). Once a menu is visible, use the arrow keys to move the highlight, and pres Enter key to select.

Command Variations:

edit

Runs the editor and starts with a blank document. When you select Save or Save As..., the file will be saved to the current directory (unless you select otherwise from the popup dialog). If you want to select a different directory before starting edit, use the cd command before using edit.

editfilename

This command will cause the file named filename to be opened by the edit editor. For example, edit mylist.txt would open the mylist.txt file. If the file filename does not exist, the editor will start with a blank document with that name (no file is created until you select Save or Save As...).

If you want to edit a file that is in a directory other than the current directory, then use the "cddirectory" command first or specify the directory name as part of the filename, such as: "edit \mystuff\ebooks\list.txt". If the filename contains spaces, enclose the entire filename in quotation marks, such as: edit "\mystuff\my downloads\list.txt"

help edit

There is no built-in help for the edit command. The program uses a simplistic window and menu system that is fairly easy to understand for any person who has experience using Windows.