How to disable Notepad++ Auto-open previous files without opening Notepad++?
Start from command line:
notepad++ -nosession
"Auto-open previous files" then should be disabled
This is for those who do not want to modify the XML config filess, and this will also work without having the Notepad++ in PATH.
As I do not have enough reputation to comment on other answers, I'll add on Jacques Hubart's comment, all credits should still be for him.
- Open Windows Run (Windows + R)
- Type in the full path to the Notepad++ EXE. This would normally be C:\Program Files\Notepad++\notepad++.exe
- Add the nosession parameter
- Run
Preview:
If, like me, you left a huge file in the last session, you can also remove just the offending file from the session and keep the rest.
go to %appdata%\Notepad++ and open session.xml
Scroll to the right to see the filename. Be careful to keep the integrety of the XML by removing the entire "file" node. It should be on a single line.
Yes, you can change that setting by modifying the config file.
go to %appdata%\Notepad++ and open config.xml
You should find the following line in there:
<GUIConfig name="RememberLastSession">yes</GUIConfig>
just change it to no and that should do the trick.