Script needed to copy a file
Posted on 2007-10-04
Hi Scripting people
I was wondering if a script will do the following; and if so, could someone advise the script i would use to accomplish this.
User logs on to a Terminal Server. They get a msgbox asking which Office they are working at. (We have users from 2 separate locations that log on to the same server)
Depending on their answer, i then need to copy a small file from a network share location on the same server & have it overwrite the same named file that exists in their own personal profile directory.
There will only be 2 files in the network share to choose from, so i would like it to copy either File1 if they select Office1 as the location or copy file2 if they select office2.
E.g 'I am working at office1'
I then need to copy \\servername\office1 file and put it into \\servername\profiles\username\office1 directory.
Hope that makes sense. Not sure if it's possible, but it would make my life much easier if i could.
1 other small question. In batch file language i can use %username% at the end of a script to have it look for that user's directory. What is the equivalent in VB scripting?
Thankyou all and have a great day..