I am using Windows 7 64-bit. I could not find a command that enables me to write a text file in the command prompt. Is there a command for this on Windows 7 x64? I tried edit but it is not supported by Windows 7 x64. Is there another command to do this?

  • Why would you need a console text editor exactly? Is this something related to SQL query composition? – Martheen Cahya Paulo Jan 24 '11 at 7:42
  • 2
    If you are coming from a nix background, or if you do a lot of work in the console generally it can be really helpful to have a bare-bones text editor - for hacking scripts etc (like vim or nano)... – AJH Jul 30 '12 at 18:55
  • notepad filename.txt should do the trick, although I freely grant that it's not edit and will launch a separate window. (wordpad, I believe, is not on the path by default, although you may need to use it if editing *n?x-originated files.) – Mathieu K. Oct 18 '17 at 0:27
  • As for when this was useful: I believe I used to view Windows shortcut (.lnk) files using edit. (I think when the links were broken, Windows couldn't edit them anymore--or maybe I was just curious.) Trying to edit them from within a GUI just followed the shortcut. This still works from the command prompt: notepad whatever.lnk. – Mathieu K. Oct 18 '17 at 0:27

Execute copy con note.txt

and type text, finish with Ctrl-Z.

| improve this answer | |
  • Very cool trick that. – paradroid Jan 25 '11 at 4:04
  • 2
    So how do I edit existing 10-MB files? – Alex Oct 16 '14 at 17:20

There is none. EDIT is a 16-bit DOS program, and Windows 7 x64 doesn't support 16-bit applications. If you need to edit text files via the command line in 64-bit Windows, you will need to use a third party application like VIM.

| improve this answer | |

If you are looking for a replacement console text editor, Brief Basic is a single .exe file and uses pretty standard keyboard shortcuts.

The original 16-bit version of Brief was widely used in the MS-DOS days.

Brief text Editor

| improve this answer | |
  • 1
    Brief requires installation; Edit did not; I do not have administrative privileges. – Alex Oct 16 '14 at 17:20
  • @Alex Brief does not need installation. It's just a single .exe file that needs to be added to any directory in your %PATH%, and any user can edit their user %PATH%. – paradroid Oct 17 '14 at 10:44
  • 1
    That might be the case; but, their website's Download link brings me to downloading Brief450.msi , which is pretty obviously an installer. Hmm, for some reason SU removes the [at]paradroid at the beginning of my text... – Alex Oct 26 '14 at 1:14
  • @Alex That's because I get a notification anyway, as the comments are under one of my answers. – paradroid Oct 26 '14 at 16:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.