Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > script to copy an entire folder?

Reply
Thread Tools Display Modes

script to copy an entire folder?

 
 
Fred Bloggs
Guest
Posts: n/a

 
      02-12-2010
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

 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      02-12-2010


"Fred Bloggs" <> said this in news item
news:...
> 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/d...displaylang=en).

 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      02-12-2010


"Fred Bloggs" <> wrote in message
news:...
> 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


 
Reply With Quote
 
Fred Bloggs
Guest
Posts: n/a

 
      02-16-2010
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.


"Pegasus [MVP]" <> wrote in message
news:F6E77467-3EC3-4173-8C40-...
>
>
> "Fred Bloggs" <> said this in news item
> news:...
>> 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/d...displaylang=en).


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      02-16-2010
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.

"Fred Bloggs" <> said this in news item
news:18156E95-B1A6-475C-890F-...
> 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.
>
>
> "Pegasus [MVP]" <> wrote in message
> news:F6E77467-3EC3-4173-8C40-...
>>
>>
>> "Fred Bloggs" <> said this in news item
>> news:...
>>> 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/d...displaylang=en).

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move \Users folder once for all Peter Meinl Windows Vista Installation 25 03-03-2010 01:37 AM
Moving folder locations BobF Windows Vista File Management 2 02-01-2008 03:53 AM
Copying CD files to folder, then copy folder to another hard drive, explorer hangs zoner@cox.nospam.net Windows Vista File Management 1 03-31-2007 05:07 PM
Documents folder not recognized as "My Documents" David Witus Windows Vista File Management 12 03-29-2007 06:29 AM
folder structure?? Rat_uk Windows Vista File Management 22 03-07-2007 08:37 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59