![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replace word in a file | sasiharitha | UNIX for Dummies Questions & Answers | 3 | 12-05-2007 01:11 AM |
| replace word in a file | ust | Shell Programming and Scripting | 5 | 11-30-2007 08:03 PM |
| Replace word. | abu_hassan | SUN Solaris | 2 | 03-04-2007 05:14 PM |
| how to replace a word with another | rkrgarlapati | Shell Programming and Scripting | 1 | 07-24-2006 07:42 AM |
| How to replace a word with a series of words in a file | brap45 | Shell Programming and Scripting | 2 | 02-21-2006 02:33 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Just go into the editor (edit.com) and change whatever. I have never seen any version of DOS (except maybe the really old ones) that do not have EDIT.COM among all the normal files like the command interpreter. From what I am aware there isn't an actual command besides edit.com that will do any kind of file editing of that sort in DOS or Windows.
To use EDIT.COM in DOS 1) Go to the directory with EDIT.COM in it (usually in the root of the C: drive or in C:\DOS\ or some similar directory) 2) Type "EDIT $FILEPATH" (excluding the quotation marks of course), where $FILEPATH is the path to the file you wish to edit (example: "EDIT A:\HOMEWORK.TXT" excluding the quotes) 3) In the MS-DOS Editor, navigate to the word you wish to replace, highlight it, and type a new word in. Then, click on File > Save and then File > Exit (or, if you don't have a mouse, use Alt + S then Alt + X) 4) Your file is now edited. Note that this does not work for formatted documents (.rtf, .doc, etc.) and I don't know if this works for documents created with VIM or other UNIX editors; if it's plain text, this method will work. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|