ok I do not know what I am doing wrong. I used the code you posted and all I get is

\\NAS1\DFS\SOFTWARE\APPLICATIONS\TEMPLATES

nothing else happens.