I'll show one specific example of what I am trying to do, I think it will explain things.
On the default
$Path there exist (in version 8) the following 4 packages
DifferentialEquations`BoundaryRegionPlot` DifferentialEquations`NDSolveProblems` DifferentialEquations`NDSolveUtilities` DifferentialEquations`InterpolatingFunctionAnatomy`
These happened to be located in
C:\Program Files\Wolfram Research\Mathematica\8.0.4\AddOns\ExtraPackages\DifferentialEquations
Currently to load these packages, I load each one explicitly, using the full name.
I have a list of all packages, and go over each package listed to load it. (I searched all the folders and opened all the .m files to find listing of all packages, then copied the names and put them in a list).
I am trying to find a way to automatically obtain the full names of these packages. Then load them, so that I do not have to have the names hardcoded in a list, which I have to update when things changes. (say when version 9 is out)
I will be happy if I can find a way to find obtain full name of packages that starts with some context name. For example, here, if I can find a way to find names of packages that start with context
DifferentialEquations before loading the packages ofcourse.
I'd like to be able to tell Mathematica: Please load all packages you find on the $Path that has such a name, and I give a name as a string pattern, may be using wildcard.
Then I can type
and have all those 4 packages loaded. The above does not work, since there is no such package.
Or tell Mathematica to find me the full name of all packages in the $Path, then I can use the result of this to load them. Ofcourse all of this would this will require a program to go open each .m file found in the
$Path, parse the content of the file to determine if it is a package or not, and if so, read the package name from the .m file.
I thought to ask in case there is a way or a command or a trick to do this already that I have overlooked.