NP++ making new folders and opening them in tabs
-
Hi, I have been reading a number of posts on here but not found anything that seems to cover this.
If I try to open a document with multiple words separated by spaces in the title like ‘word1 word2.txt’ NP++ opens a small window saying ’ \word1\word2 does not exist, create it?’ then it will make folders with those names and open a tab for each but none of the tabs contain the text in the document and if I click ‘no’ NP++ just closes. Is there any way to stop it doing this and get it to just display the text in the document.
NP++ ver 8.9.2 64 bit -
From a Windows command line, to pass a filename with spaces to an application, you need to put quotes around the filename. This is the way that Windows defines the command-line interface, and not something specific to Notepad++
update: sorry, that was an abbreviated response. Real life interrupted, so I posted what I had so far, at the time. continuing where I left off:
So, from the command line,
notepad++.exe word1 word2.txtwould try to openword1andword2.txtin the current directory, which presumably don’t exist, whereasnotepad++.exe "word1 word2.txt"would properly try to open the file with spaces in the name.If you are using the right-click context menu in Explorer, the normal Edit with Notepad++ (which gets added via NppShell.dll, when you do a normal Notepad++ installation), then it should handle the spaces just fine. But if you created your own Notepad++ entry using
regeditor a registry.regfile, you have to make sure that your entry says,"c:\Program Files\Notepad++\notepad++.exe" "%1", with the quotes around each, otherwise it will behave as you described.Again, requiring the quotes around the filename is just the way Windows OS has defined the command-line interface (but similar is true in other operating systems, as well, because any OS must be able to tell the difference between
program file1 file2.txttrying to work on two different files andprogram "word1 word2.txt"trying to work on one file with a space in the name.)