Thank you for the feedback. Although I'm always open to constructive criticism, I must disagree with your statement that the script will not work as written. Other TechRepublic staff and I have tested the script and found it works properly. In fact, changing the script as you suggest caused an error message when I ran the script.
Does the script function when you run it?
As for sloppy programming, I acknowledge that this script is not perfect--but then little, if any code ever is. I am not a VB scripting guru, but I was able to quickly write a script that accomplishes what I believe is a useful task. I also openly called for comments and improvements.
I encourage you, and all TechRepublic members, to submit an improved version of this script. Send me a private message using a link on my profile page: https://www.techrepublic.com.com/5213-6257-0.html?id=3318195.
The message should outline your proposed improvements. I will evaluate your suggestions and determine whether they warrant updating the download. If they do, I'll publish a new version and of course provide you full credit for the suggested improvements.