It's all about the answers!

Ask a question

Load rule: exclude sub folders

Alexander Schick (2714) | asked Jun 23 '16, 9:58 a.m.
edited Jun 29 '16, 10:54 p.m. by David Lafreniere (4.8k7)
Hello everyone,

we are currently trying to exclude a sub folder in a component from being loaded. In the load rule, we are using the parentLoadRule with exclude and filter elements below. This works fine when excluding elements in the root folder of the component, but we cannot exclude only specific sub folders.

For example, we have the following structure in the component:
- Test
- Test\A
- Test\B
We would like to only exclude "Test\B".

Is this possible at all? The documentation seems to hint into this direction: "[...] filtering to control which of the immediately contained items should be loaded [...]"

I appreciate any input or advice on this topic!

2 answers

permanent link
Alexander Schulz (1112) | answered Jun 27 '16, 2:34 a.m.
Hi Alex,

you can use "Parent Load Rule" and "Exclude filter"



The exclude element is a collection of filter elements to be applied to the names of the items contained within the parent folder to decide whether they should be in the list of items to be loaded or not. Note the include filters are also applied (if specified) so if the include filters does not identify an item to be considered for loading, then it will also be excluded even though not specifically listed in the exclude filters. The filter allows for an exact name match or a pattern match on the name.


Mallikarjuna Kandala commented May 18 '17, 1:23 a.m.

When I use Parent load rule and exclude filter , it is not filtering the files inside the sub folders. It just filters the files at the top level/root directory of component.

permanent link
Christian Giesa (13136) | answered Feb 11 '20, 9:00 a.m.

 Hello Alexander,

you can achieve this like the following:

        <component name="Component/>
<parentFolder repositoryPath="/"/>
            <filter pattern="Test"/>
        <sandboxRelativePath pathPrefix="/Component/"/>

        <component name="Component/>
<parentFolder repositoryPath="/Test/"/>
            <filter pattern="B"/>
        <sandboxRelativePath pathPrefix="/Component/Test/"/>

Your answer

Register or to post your answer.