Discussion:
script to copy an entire folder?
(too old to reply)
Fred Bloggs
2010-02-12 16:37:17 UTC
Permalink
Hi,
I'm looking to get a folder including it's contents moved from a shared
server folder to the users c drive, during their login. I have a script to
move a file, but is it possible to copy a folder / directory too?

TIA
Al Dunbar
2010-02-13 00:10:08 UTC
Permalink
Post by Fred Bloggs
Hi,
I'm looking to get a folder including it's contents moved from a shared
server folder to the users c drive, during their login. I have a script to
move a file, but is it possible to copy a folder / directory too?
If you are using vbscript, I believe that the file system object supports a
copyfolder method in addition to copyfile.

If you are using batch, the xcopy command has a switch that does that: /s

/Al
Pegasus [MVP]
2010-02-12 23:34:39 UTC
Permalink
Post by Fred Bloggs
Hi,
I'm looking to get a folder including it's contents moved from a shared
server folder to the users c drive, during their login. I have a script to
move a file, but is it possible to copy a folder / directory too?
TIA
Does it have to be a script? The "CopyFolder" wheel has already been
invented with the xcopy.exe or robocopy.exe command
(http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en).
Fred Bloggs
2010-02-16 13:20:15 UTC
Permalink
Hi all,
Many thanks for that, what I'm trying to do is this.

in the past a support firm have set a group policy to store corporate
templates for office programs on the network drive.
Every now and then we get problems with the templates and users are getting
an error message each time they shut word, excel, outlook etc. The message
refers to the normal template. So I have rejigged the policy to look at a
local folder on each laptop.
As a 1 off I'm looking to modify the login script so the contents of the
network templates folder can be copied to each users laptop, to the new
location given in group policy.

I'm concerned that if i send out a script, that either the anti virus on
each pc will block the script, or users will ignore the message until it's
too late as such.

I hope that explains things further....

Thanks for your assistance so far.
Post by Pegasus [MVP]
Post by Fred Bloggs
Hi,
I'm looking to get a folder including it's contents moved from a shared
server folder to the users c drive, during their login. I have a script
to move a file, but is it possible to copy a folder / directory too?
TIA
Does it have to be a script? The "CopyFolder" wheel has already been
invented with the xcopy.exe or robocopy.exe command
(http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en).
Pegasus [MVP]
2010-02-16 20:17:16 UTC
Permalink
AFAIK, anti-virus software will not block a batch file. It might block a
specific command invoked by the batch file but this is very unlikely to
happen with a native Windows tool such as robocopy.exe or xcopy.exe.
Post by Fred Bloggs
Hi all,
Many thanks for that, what I'm trying to do is this.
in the past a support firm have set a group policy to store corporate
templates for office programs on the network drive.
Every now and then we get problems with the templates and users are
getting an error message each time they shut word, excel, outlook etc. The
message refers to the normal template. So I have rejigged the policy to
look at a local folder on each laptop.
As a 1 off I'm looking to modify the login script so the contents of the
network templates folder can be copied to each users laptop, to the new
location given in group policy.
I'm concerned that if i send out a script, that either the anti virus on
each pc will block the script, or users will ignore the message until it's
too late as such.
I hope that explains things further....
Thanks for your assistance so far.
Post by Pegasus [MVP]
Post by Fred Bloggs
Hi,
I'm looking to get a folder including it's contents moved from a shared
server folder to the users c drive, during their login. I have a script
to move a file, but is it possible to copy a folder / directory too?
TIA
Does it have to be a script? The "CopyFolder" wheel has already been
invented with the xcopy.exe or robocopy.exe command
(http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en).
Loading...