The Load command in a dyapp script has been extended to allow loading of entire folders of scripts. If so, it creates a namespace structure matching the filesystems folder structure. If you organise your scripts like you want them in your workspace, this might work for you.

The dyapp file may contain a trad function definition instead of a load script. This is a relatively new extension (introduced 1-2 years ago?). This is essentially equivalent to a function triggered by ⎕LX. To load scripts in such a function you would use either ⎕FIX (which can load individual scripted functions as well as scripted spaces) or ⎕SE.SALT.Load (what is used by ]SALT.Load and the Load command in a traditional dyapp file).

3.4.1 .dyapp FilesFiles with the .dyapp extension comprise a .dyapp script, each line of which is either aLoad instruction, a Target instruction or a Run instruction:l Load instructions specify the full path and filename of the file to be loadedl Target instructions change the target environmentl Run instructions specify the name of the method to runThe .dyapp script must include at least one Run command.revision 20170703_270 8SALT User GuideFor example, a .dyapp file could consist of the following lines:Target #Load study\files\ComponentFileLoad study\files\KeyedFileLoad MyAppRun MyApp.MainFiles with the .dyapp extension can also contain a niladic or monadic tradfn;double-clicking on these files allows bootstrap loading of a Dyalog application.Starting a .dyapp file that has been created by the user runs that file in a clear workspace.If the .dyapp file has been created by the Snap SALT function then it runs in a workspacewith the same name as the workspace from which it was created. For more informationon the Snap function, see Section 4.1

and all my attempts failed with the whole structure being brought into the root.

I went as far as to copy all the objects into a new WS and ]snap the whole thing as a new project. ]snap created the structure I expected and now my subfolder has a new file called name.txt. name.txt has some [] variables settings.

Sorry Norbert, I spoke to soon. You are right, to load a folder structure you need to snap it first as that creates the meta data for traditional namespaces (the name.txt file). I didn't know that it in turn prevents you from loading the content using the wildcard approach ]load dir\*

Either way, if you do want all files to be loaded into your workspace, just create the structure in your workspace first and then snap it (as you've discovered already).

If you want to cherry pick and load specific files into specific namespaces then go with my second suggestion. Create a trad fn that builds up your app and ]save it to file with a .dyapp extension. For example: