Solved Replacement for EDIT.COM for creating batch files w/ASCII

apterix

New Member
Messages
2
DOS is not dead, at least not yet for me. However in Windows 8 a useful utility has been has now been lost with the elimination of EDIT.COM.

I use batch files for a variety of purposes which are much faster than mousing through a GUI, for example to archive, backup and move files using xcopy and it's switches to make conditional backups of files, excluding files which do not need to be overwritten because their date or archive attribute has not been changed. No problem there, I can still use notepad for these basic batch files.

HOWEVER: The problem comes when I want to include ASCII characters within the batch file to echo to the screen as information text boxes. Example below.

echo ╔════════════════════════╗
echo ║ Backup completed ║
echo ╚════════════════════════╝
echo.

Since EDIT.COM has now been eliminated from Windows 8, is there any 64-bit text editor editor out there that anyone knows of that will allow the creation and saving of ASCII special characters in a batch file?

I have tried "Vim", "Nano", "Notepad++"... NONE of these work! They all completely obliterate the ASCII characters replacing them with unintelligible gibberish. Of course, old 16-bit Edit.com will no longer work on Windows 8.

If anyone know knows of a text editor I can use in Windows 8 that will function like good old "edit" for placing ASCII characters in a batch file I'd love to know. Respectfully, please don't respond with guesses or "...have you tried..." but only if you have encountered this issue and KNOW the fix.

Thanks, Apterix
 

My Computer

System One

  • OS
    Windows 8
It's all to do with character sets, I believe.

I think Notepad++ may be useful after all. I pasted your few lines into a text file, and it looks strange.

However by changing the character sets, it seems to work better.

So changing to OEM-US here
ForumEditQry_20130312.png

gives something like this.
ForumEditQry_20130312a.png

And it works in a batch file when I tried it. (This is after I put @echo rather than echo at the start of each line.)
ForumEditQry_20130312b.png

Note I picked the character set OEM-US more or less at random so it may not work for everything. But it looks promising.

Edit: forgot to say - when I opened the file again it again looked odd, but it looked fine after changing the character set back. I don't know if it's possible to automate that bit so it always defaults to that character set.
 

My Computer

System One

  • OS
    Windows 8.1, 10
David:
Most excellent solution. I tried the solution as you suggested. By changing the Encoding to ANSI and OEM-US I was able to create the characters using the [alt]nnn keys. Though running the batch file did not display saving as a text file with a .bat extension, it DID function properly when designating: "Save as Type (Batch file (*.bat, *cmd, *nt)"

Appreciative thanks for both your prompt, and clearly illustrated, response! Resolved. Thanks, Apterix
 

My Computer

System One

  • OS
    Windows 8
Back
Top