change right click -> edit, text editor

vage

2[H]4U
Joined
Jan 10, 2005
Messages
3,038
OK so I have a few batch files and I need to edit them constantly, when I right click on the file, I have the option to edit it, but it always opens in notepad. I'd like it to change to open with notepad++, how can I do this?

Note that this isn't for double clicking on it, when I double click it, it should run.
 
yes well, I'm pretty sure a .bat file is not a .txt file.....
 
In XP: Windows Explorer -> Tools -> Folder Options -> File Types -> BATCHFILE extension -> Change Opens With...
 
I believe you can make a batch file pull commands from a txt file, been awhile since i have done it, but you may be able to
 
yes well, I'm pretty sure a .bat file is not a .txt file.....

Considering that you can write batch files in text files, I don't see how this is an issue. A simple matter of changing the file extension to .bat and you're done. Or you could just be a complete ass about it.
 
Considering that you can write batch files in text files, I don't see how this is an issue. Or you could just be a complete ass about it. A simple matter of changing the file extension to .bat and you're done.

Yikes, you internet thugs get offended easily huh?

Its just that I have my text files already set to open with notepad++ though already and it doesn't work for right click -> edit on .bat files.

I don't think I want to change the "Open with" option either because I'm not opening it, I'm editing it.
 
why not just keep two copies, one as a .txt the other as a .bat,

then when you need to make a change, change the txt file, do a save first, then a save as and write over your batch file

That sounds logical

Yikes, you internet thugs get offended easily huh?

Careful, some peoples lives depend on the internet, and the opions of others on forums, lol
 
eh, yeah I guess that would work, but if I could find a solution that would obviously be the best. Maybe there is a registry setting I can change? Anyone have a good reference for registry keys?
 
Yikes, you internet thugs get offended easily huh?

Its just that I have my text files already set to open with notepad++ though already and it doesn't work for right click -> edit on .bat files.

I don't think I want to change the "Open with" option either because I'm not opening it, I'm editing it.

IMHO, it would be easier to have the batch files in text files, and modify the text files. Save the text files to batch files and you wouldn't have to worry about your batch files needing edited. Plus you have a backup of your batch file should you screw something up rather than editing your only copy.

Perhaps I'm just old fashioned and I've always created batch files by creating it in a .txt first then saving the txt as a bat.
 
Good news, I think I found a registry key edit:

source = http://www.windowsnetworking.com/nt/registry/rtips225.shtml

Code:
[B]Hive:[/B] [COLOR=green][B]HKEY_CLASSES_ROOT[/B][/COLOR]
[B]Key:[/B]  [COLOR=green][B]batfile\shell\edit\command[/B][/COLOR]
[B]Name:[/B] [COLOR=green][B]Default[/B][/COLOR]
[B]Type:[/B] [COLOR=green][B]REG_EXPAND_SZ[/B][/COLOR]
[B]Value:[/B] [COLOR=green][B]%SystemRoot%\System32\NOTEPAD.EXE %1[/B][/COLOR]  default
[B]Value:[/B] [COLOR=green][B]C:\Program  Files\ULTRAEDT\UEDIT32.EXe %1[/B][/COLOR] my choice
 
If all else fails, left click once on the name so you highlight it and just change the extension from .bat to .txt on the files then open and edit it in notepad. Then save them with the .bat extension when done. You don't have to use "open with", in some cases you won't get that option when you right click. Or just keep a copy in each format as mentioned above.
 
Back
Top