Copy folder to all profiles

  • Thread starter Thread starter jaime
  • Start date Start date
J

jaime

Is there a way to copy 1 folder to all profiles on the
computer? I have tried placing the folder in the 'All
Users' and in 'Default User' but that does not work. I
want to copy a folder under the \*user*\Application Data\
to all the users that have logged on to the computer.
 
You can do this with a VB script. Lets say you want to put the file into
each sub folder to "Documents & Settings"

Something like this would probably do the trick

Dim oFSO
Dim oFolder
Dim Userfolder
Dim folder

Set oFSO=CreateObject("scripting.filesystemobject")
Set oFolder=oFSO.GetFolder("c:\Documents and Settings")

For Each folder In oFolder.SubFolders

oFSO.copyfile "c:\myFiletocopy.txt", folder.path,True 'True if oiverwrite is
required
next

Cheers

Niclas
 
You are not going to be able to this with the built-in copy command. A VB
script would do it though.

Try the Technet Script Center.

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/default.asp

Buz Brodin
MCSE NT4 / Win2K
Microsoft Enterprise Domain Support

Get Secure! - www.microsoft.com/security

This posting is provided "as is" with no warranties and confers no rights.

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
 
Thank you both for the reply. Unfortunately, I am not
very familiar with VB script and was looking for
something a little easier like a batch file. Do you know
of any such commands to do this?
 
Not me, try the scriptcenter or a VB-centric NewGroup.

Buz Brodin
MCSE NT4 / Win2K
Microsoft Enterprise Domain Support

Get Secure! - www.microsoft.com/security

This posting is provided "as is" with no warranties and confers no rights.

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
 
Back
Top