38

I would like .txt files to open with Notepad++ by default in Windows 10. I have found the options to change file associations but there is no option to specify custom programs. Here's a screen shot:

enter image description here

How can I make Notepad++ default program for .txt files?

Paolo Forgia
  • 103
  • 3
CiaranWelsh
  • 2,626
  • 5
  • 17
  • 20
  • 2
    Are you sure that Notepad++ has been installed using `setup.exe` and was not just extracted from .zip archive which is a.k.a. "portable installation" ? You can associate file type _only_ to the applications installed using setup.exe – maoizm Oct 25 '18 at 13:04
  • 1
    @maoizm I use portable versions of Notepad++ and I have no problems associating it as the default for .html, .css, .js, etc. filetypes – InterLinked Nov 01 '18 at 20:08
  • 1
    @InterLinked well, thanks, this is really helpful as I use a lot of portables and for sure last time I tried it didn't work – maoizm Nov 02 '18 at 06:10
  • 1
    Possible duplicate of [SSMS wont give up file associations](https://superuser.com/questions/1373310/ssms-wont-give-up-file-associations) – Scott - Слава Україні Nov 11 '18 at 17:46
  • @maoizm Not true, you can associate with any .exe you can point to. I have done so and continue to do so on occasion. – person27 Dec 31 '18 at 06:53
  • Good News !!!. Finally it worked in Windows 10. Step 1) Follow David answer to open .txt file notepad Plus. Step 2) Rename your file as .txt Step 3) Double click your file, it automatically opens in Notepad++. Please UPVOTE if this works for you also. – Nages Jun 10 '20 at 23:07

6 Answers6

40

How can I make notepad++ default program for .txt files?

  1. Run Notepad++ as an Adminstrator

  2. Menu > Settings to open the "Preferences" dialog

    • Click "File Association"

    • Click "Notepad", then

    • Click ".txt". then

    • Click "->" to register notepad++ as the program to edit .txt files:

    • Click "Close"

enter image description here

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • 11
    Doesn't work in Windows 10. Not sure why. –  May 20 '18 at 10:50
  • 5
    @EUserNameError You have to run as Admin. Answer updated. – DavidPostill May 20 '18 at 11:51
  • 2
    Tried that. Doing so even prompts the other non-admin users if they want to update their file association. But the very first time that non-admin user visits the Preferences dialog box, his/her choice gets null and void. And I really hate being called by each of the 133 computer users when they want their admin to update their file association, especially when it is to no avail. So a -1 for needing admin privileges. –  May 20 '18 at 11:56
  • YES. For some reason, even though I performed the steps of the other answers, my computer just wouldn't let me set the default app to notepad until I did your method. – Lewis Nakao Sep 21 '18 at 21:22
  • This type of configuration should never be done on an app-specific level, always on an OS level. The top answer gets this right. – pzkpfw Oct 18 '18 at 08:57
  • @pzkpfw - Which answer is the "top" answer. Please note I am pointing out that the order of the answers is dynamic, so really your comment, shouldn't be submitted under this answer but instead upvote the correct answer. – Ramhound Oct 23 '18 at 17:18
  • 4
    Unlike the chosen answer, this one actually works! I'm betting this got broken in a Windows 10 update, because I always used to open txt files with notepad++. – Luigi Plinge Nov 03 '18 at 15:35
  • 2
    @pzkpfw - while true in general, something in a recent windows update appears to have broken the "normal" OS methods, for some users (including me). Hence this answer is a useful alternative. – ToolmakerSteve Nov 04 '18 at 11:18
  • Didn't work for me (windows 7) – ashleedawg Nov 11 '18 at 09:49
  • @ashleedawg Well it works for me. That's why I wrote the answer. And I'm running Windows 7. – DavidPostill Nov 11 '18 at 09:51
  • Had to login so I could thank you because this was getting me upset that I wouldn't be able to make my files to open with Notepad++ by default, but your solution worked. I found it from [this](https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4984) open issue which mentioned your fix. – user7393973 Nov 29 '18 at 18:49
32

Follow the below steps

  1. Right click any .txt file and click

Open With > > Choose another app

  1. In the opened window click

More Apps

enter image description here

  1. Scroll to bottom and click

Look for anther app on this PC
enter image description here

  1. Navigate to install location of Notepad++. Default is

C:\Program Files\Notepad++

  1. And select "Notepad++.exe"
I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
MSM
  • 659
  • 1
  • 6
  • 11
  • 3
    Its strange that you can't do this through the settings panel. Seems like a mistake to me... Thanks for the info. – CiaranWelsh May 20 '18 at 11:06
  • 15
    Just don't work, it changes back to notepad immediately. – Daniel Hári Oct 16 '18 at 14:46
  • 1
    I had to install Notepad++ Fork from Windows 10 store: https://www.microsoft.com/en-us/store/p/notepad-fork/9plhc123mqwt to make all mentioned methods work:/ – Daniel Hári Oct 16 '18 at 14:59
  • Sadly, it only works for _most_ - but not all - files. I can, for example, not re-associate *.log files. Which is incredibly annoying... – Structed Dec 07 '18 at 20:00
  • 3
    I'm trying to set vim as my default editor for .txt files. I've been using this exact method for ages, but for some reason it seems to be broken on 17134 of Win10. – JBarberU Dec 11 '18 at 16:56
  • Unfortunately, the above tip only works when you have installed Notepad++ by downloading it from the web site and installing it explicitly. When you have installed it as an App via the "Look for more Apps in the Store" previously, it will be installed to some other location (C:\Program Files\WindowsApps) that is not accessible via "Look for another App on this PC". – olenz Dec 11 '19 at 04:58
  • There are several ways to select Notepad++, but only this way you get the checkbox "always use this app". Windows is like a game . . . – Roland Sep 15 '22 at 18:06
25

With Windows 10 (Oct 2018) this worked for me:

  • Open Notepad++ as an administrator and then follow the steps posted by DavidPostill above

then

  • Go through the normal Windows process of right click "Open With >" > "Choose another app" and click the "Always use this app to open .txt file" box.
Edward
  • 251
  • 3
  • 2
  • 1
    this worked for me. Double clicking on the file in Windows Explorer works as well instead of "Open With". – fpiette Oct 29 '18 at 08:49
  • 1
    only this worked for me (**WINDOWS 10**) – T.Todua Nov 23 '18 at 12:24
  • 3
    As of 12/4/2018 this method worked. One part or the other did not on its own, but together it did the trick. I'm guessing the most recent Windows update broke the Default Apps thing, which is kind of obnoxious. **NOTE:** Once the steps are done, your txt files should take on the Notepad++ icon, so you don't actually have to run n++ as admin again after you're finished. – Ari Roth Dec 05 '18 at 04:09
  • There is a file association issue that exists in Windows 10 April 2018 Update and Windows 10 October 2018 Update. Which has been [fixed](https://superuser.com/questions/1373310/ssms-wont-give-up-file-associations/1374236#1374236), the solution is simple, update your system. – Ramhound Dec 08 '18 at 04:56
  • You genious! Thanx – Francesco Mantovani Dec 14 '18 at 00:06
5

This took me a minute, but this should help.

  1. Find a .txt file
  2. Right click it
  3. Select "Open with..." --> "Choose another app"
  4. Scroll down and select "More Apps" on the popup
  5. Select "Look for another app on this PC..."
  6. Find and select notepad++.exe
Mulli
  • 111
  • 4
4

If nothing of the above works, try using this:

https://www.binaryfortress.com/NotepadReplacer/

and then Right click on the file > Open With > Choose another app and select Notepad++

lsassa
  • 74
  • 3
-1

Okay, here is a work around:

  1. Create a dummy file with the extension you wish to default to your program. The file can be empty.
  2. Right click on the dummy file and select Properties.
  3. On the General tab there is a section that states: Type of file: Opens with and a button that says . Click Change.
  4. How do you want to open files from now on? Choose .
  5. Scroll to the bottom and select Go to C:\Program Files (x86)\Notepad++ and select and select
  6. Close Properties and your done!

Credits to Kent Lasley from : https://notepad-plus-plus.org/community/topic/13051/set-notepad-as-default-app-in-windows-10

  • 1
    @SherylHohman - There is a file association issue that exists in Windows 10 April 2018 Update and Windows 10 October 2018 Update. Which has been [fixed](https://superuser.com/questions/1373310/ssms-wont-give-up-file-associations/1374236#1374236), the solution is simple, update your system. – Ramhound Dec 08 '18 at 04:56