wget recursive limited to children of URL path

Use the --no-parent option in wget:

--no-parent

Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded.


Try using the -I option to specify the directory to include in the download:

wget -r -I www.example.com/A/B/C,www.example.com/A/B/D