Source Insight has a few ways to add a list of files and directories to a project. The easiest way is to go to Project > Add And Remove Project Files...
, select "add from list", then select a file. This file can containt absolute file paths or paths relative to the Project Source Directory specified in Project > Project Settings
. You can also use the AddFileListToProj(hprj, listfilename)
function in a Source Insight macro if you'd like to do it that way. From the documentation:
Adds a list of files to the project hprj
. The listfilename
parameter is a string containing the name of the list file. The list file should be a text file containing one file name per line. The file can also contain one directory per line, in which case the directory's contents are added to the project.
Now, you just need to create the list of files. You can either do it externally however you wish, or you can let Source Insight create one from a previous project. To do this, simiply open the project you want to use as your "template" and go to Project > Project Report
. Uncheck all of the boxes and click "OK". Now delete the header lines from the top of the report and the "total files..." line from the bottom. You should be left with a list of all the files in the project relative to the project source directory. Save this file to use to add files to new projects in the future.