I looked at all of the examples and did not see any example that would extract the dcr location from the html file.
I ended up looping through the dcr directory and then hardcoding the directory to the html pages so that I could create the href links. What I wanted to do was not hardcode the directory to the html files but I never found out how to extract the dcr from the html.