Although some of the regulars here are excellent at writing scripts, for
such basic scripting questions as you are asking in this and other posts
you'd do better to spend some time at TechNet's Scripting Center.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.