Dragging and dropping opens the folder as workspace, but launching notepad++ from commandline and passing a folder as argument opens all the files int he folder instead of opening as workspace. How can I open a folder as workspace from commandline in notepad++.
I use version 7.2.2
Folder as Workspace When you drag a folder from Windows Explorer onto Notepad++, this feature will be activated (unless overridden by the ”… folder dropping” option). You can also load a Folder as Workspace using the -openFoldersAsWorkspace command line argument.
You can use it either with an open folder in a notepad or using the plugin. Open the folder as a tree view One way, Select File menu > select Open Folder as workspace item, It opens the folder as a file tree view in the left side navigation.
From your command prompt you can type notepad++ textfilename. txt and it will launch notepad++ with that file. Note: You must type the name the same as the shortcut. So if you named the shortcut notepad++.exe you need to type it that way in the command prompt.
This feature is now available in v7.8 release
Here's the commit description which gives an example :
Add the ability to open folders in "folder as workspace" panel via command line argument "-openFoldersAsWorkspace".
Example:
notepad++ -openFoldersAsWorkspace c:\src\myProj01 c:\src\myProj02
The above command will launch notepad++ with folder as workspace panel by opening myProj01 and myProj02 in panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With