0

I work with a lot of different data in text files and the extensions are used for categorizing what data is contained so windows is always complaining that it doesn't know what to do with these files when I try to open them. Is there a way to get windows to automatically open file types it doesn't recognize in a specific program (notepad++) or is there a way to write a script or something to triple click, or middle mouse click etc the file to open it in notepad++.

I realize I can right click and there is an "Edit in Notepad++" option but when I'm working with a large number of files the less clicks/mouse movements the better.

I'm using Windows 7.

amccaffrey
  • 1
  • 1
  • 1
  • 1
    possible duplicate of [How to set the default program for opening files without an extension in Windows?](http://superuser.com/questions/13653/how-to-set-the-default-program-for-opening-files-without-an-extension-in-windows) – Leo Chapiro Sep 29 '14 at 15:37
  • Why don't you just keep a copy of notepad++ running and then drag/drop your files onto notepad++ to edit them? Drop to empty part of tab bar. Works with multiple selected files as well. – DavidPostill Sep 29 '14 at 19:03

4 Answers4

1

Don't change the file extension in your workflow. You can still indicate WHAT the file is in the filename and come up with a name scheme that will still sort the way you need it to. Keep the extension .txt.

Wutnaut
  • 728
  • 4
  • 16
0

Right click the file and go to properties. Right at the top, it says "Open with: _______" and the option to change what it opens with. This will set the particular file extension to always be opened with whatever program you choose.

Wutnaut
  • 728
  • 4
  • 16
  • Thanks, this will work with on file but I'd have to do this with almost every file because a lot of them use a custom extension to display the date the data was logged so I'd have to do this with every almost every file I'm working with and wouldn't save me any time. – amccaffrey Sep 29 '14 at 17:15
  • Then I suppose it's specific to/controlled by the custom extension - can you give me more details about that? – Wutnaut Sep 29 '14 at 17:43
  • The problem is we create data in text files but we change the extension to something like .15d which could mean data for a full day on the 15th day, or .156h which could mean hourly file for 15th day 6th hour so the file extensions aren't consistent. So I need something that is general, essentially if Windows doesn't recognize the file type I want it to try to open it in notepad++ rather than asking me what to do with the file. Thanks for the help. – amccaffrey Sep 29 '14 at 18:37
  • 1
    I don't think Windows will allow you to set a "catch-all" program to open unknown extensions. – Wutnaut Sep 29 '14 at 18:57
0

I have found this tip (the same here), just adjusted to Notepad++ instead of Notepad:

Cut and paste the following script into notepadunknown.reg and run it.

REGEDIT4
BLANK LINE GOES HERE
[HKEY_CLASSES_ROOT\Unknown\shell\Open\Command] @="notepad++.exe %1"
BLANK LINE GOES HERE

This should work for all versions of Windows.

Leo Chapiro
  • 15,459
  • 5
  • 42
  • 45
0

Amccaffrey,

Your file extensions and program associations are located below in the registry:

enter image description here

What you need to do is modify the program that is used for the extension you wish to change. If you want, this could be incorporated easily into most programming languages to automatically cycle through certain ones.

Hope this helps you along your way at least.

Eric F
  • 3,319
  • 5
  • 24
  • 42
  • Thanks but the problem is the files changes will be different depending on what I'm working on, and some files use a custom extension that is the date the data was logged so there is a large number of possible extensions I'd have to associate with the program. – amccaffrey Sep 29 '14 at 17:14