How to Create Text Based Files (other than .txt)

If you are looking to create text based files like .bat, .vbs or .html, etc etc. Look no further!

You will be prompted with a dialog to enter the name.

it also has 2 alternative options when you hold down modifier keys including:

+SHIFT: Open in PRIMARY editor

EXAMPLE: Create a batch file

@set name {dlgstring|Enter name\nwithout the .bat extension|}
cd {sourcepath}
echo. > "{sourcepath}{$name}.bat"
sleep 1
"C:\WINDOWS\NOTEPAD.EXE" "{sourcepath}{$name}.bat"
"C:\Program Files\Notepad++\notepad++.exe" "{sourcepath}{$name}.bat"

NOTE1: you will obvioulsy need to setup the path to your secondary editor (if any), and possibly the primary (also in user cmd below).

NOTE2: It would be ideal to have a sleep cmd (as you see it above), but sleep cmds are not all the same from OS to OS
winxp doesnt come with one at all but you can install a package from Microsoft (for xp) (this is for windows 2003 but its safe for use with xp when just using sleep)

as for vista and above this command could be Timeout (not sure)
but it does work w/o the sleep cmd...

here is the User-defined command (you will need to import into opus)that allows you to specify the extension... (581 Bytes)
To use this in a button/menu:

CreateFile bat

Happy coding

How to Create New/Empty Files has some alternative ways which I'd say are better than using DOS/echo to create the file.

Yes you are correct but as it says in the help manual for FileType NEW

"Only files that have a registered "new" handler can be created in this manner"

so if you want to create a bat, vbs... isnt using the DOS echo one way?

See the third example in that post. You can create 0-byte files with other extensions using the .txt template.