Add files from document list to Project
-
I see that you can open files in the Project tab to add them, but I was wondering if there’s a way to take a large number of already opened files from different folders in the document list and add them to a project without having to go back and re-open them in the project tab.
-
I don’t believe so, at least in the sense of “wow, it’s easy and here’s how”.
But, a project workspace is just a file, containing textual links to other files. You could manually build such a file.
I guess it depends how many files you’d want to do this for, to see if it is worth it to take the manual approach, over the “really manual” approach of adding one file at a time, in the existing UI.
-
As an example, a project lives in a
.workspace
file, so you might create a new file and name itMyWorkspace.workspace
.Then you could put the following inside:
<NotepadPlus> <Project name="proj1_name"> <File name="..." /> <Folder name="folder1_name"> <File name="..." /> <Folder name="folder2_name"> <File name="..." /> </Folder> </Folder> <File name="..." /> </Project> <Project name="proj2_name"> <File name="..." /> <File name="..." /> </Project> </NotepadPlus>
The
...
are where you’d put the pathnames to files you’d want at that level in the project hierarchy.Of course you can change your
proj1_name
, etc., and yourfolder1_name
, etc.Folders are entirely optional; if you wanted everything top-level then your workspace file structure would simplify to:
<NotepadPlus> <Project name="proj1_name"> <File name="..." /> <File name="..." /> <File name="..." /> <File name="..." /> <File name="..." /> </Project> <Project name="proj2_name"> <File name="..." /> <File name="..." /> </Project> </NotepadPlus>
and if you have only 1 project it simplifies even further to:
<NotepadPlus> <Project name="proj1_name"> <File name="..." /> <File name="..." /> <File name="..." /> <File name="..." /> <File name="..." /> </Project> </NotepadPlus>
So, really you’d just fill in the
...
for each file that you wanted as part of the project.An easy way to get textual pathames to all of your files currently open is:
- Window menu, select Windows…
- press Ctrl+a
- right-click on the selected area and choose Copy Pathname(s)
Do a paste wherever you are building up your
.workspace
file, and then move data around to replace the...
with real filenames.(If you are really slick, a single column-block copy and paste could do it for you.)
-
Thanks for the detailed response. You are right, it may just be easier to reopen them in the project itself.