Solved

copy folder to each client machine

Posted on 2009-04-08
8
164 Views
Last Modified: 2012-05-06
I would like to copy a folder from a network share to all client machines on the network. Can this be done via GPO or login script.

The client machines already have a folder of the same name but the one on the share has a few changes in it. It needs only copied to the client machine once
0
Comment
Question by:QGolden
8 Comments
 
LVL 11

Accepted Solution

by:
xtreminator earned 100 total points
Comment Utility
u can create batch file with following

u need following things to do....

hope u have win 2k/xp client side
Shared folder in netowrk with copy rights in newtork for all client


xcopy \\server\share /s/e/h/y client pc
0
 
LVL 31

Assisted Solution

by:DrUltima
DrUltima earned 300 total points
Comment Utility
That solution will work, but it will recopy the folder every time the file is run, so if you are using GPO or Login script, you will get lots of copies performed until you remove the script.  In the scenario above, I would first create a flag file to copy to the destination computer and put it in the origination folder.  Check to see if it exists on the destination computer before you do the xcopy.  This way you will only perform the copy once rather than X number of times.
0
 
LVL 3

Assisted Solution

by:darmented
darmented earned 100 total points
Comment Utility
I agree with DrUltima, you don't want to copy the folder every time someone logs in. I would also use the flag file to check the status of the folder via a Kix script and if it is a large folder, rather use robocopy (also via Kix) to sync the folder as apposed to copying it
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:QGolden
Comment Utility
Is there a easy to follow tutorial on creating and setting a flag file then using xcopy?
0
 
LVL 31

Assisted Solution

by:DrUltima
DrUltima earned 300 total points
Comment Utility
What language are you using to write the script?

A flag file can be anything, really... a blank text doc (with txt or flg or whatever as an extension), a uniquely named grafic , etc.

The concept is for your script to check for the existence of the file.  For example, in KIX, you could do something like the below code.

IF EXIST("C:\Program Files\Program\Flagfile.flg")

   ;do nothing

ELSE

   COPY "\\sourceserver\sourceshare\*.*" "C:\Program Files\Program\*.*" /Y

ENDIF

Open in new window

0
 

Author Comment

by:QGolden
Comment Utility
Was maybe planning on VB I don't really know which language to use as I'm not to familiar with any.

What is KIX is it a language? It seems you first have to install it but if I write a script in VB I wouldn't have to install anything.

Is KIX better suitedfor login scripts
0
 
LVL 31

Assisted Solution

by:DrUltima
DrUltima earned 300 total points
Comment Utility
VBScript below.  

KiXtart is a language that was written by MS employees to specifically make the creation and maintenance of login scripts easy in a Windows NT 4 environment.  It is sill functional in an AD environment, and (to me) is one of the easiest script languages to learn.  It does take the downloading and installation of the KiXtart program, but it is small and free.  I use a combination of KIX, VBScript, and PowerShell.

http://www.kixtart.org for more info on KIX.

dim flagFile
 

flagFile = "c:\program files\someprogram\somefile.txt"
 

If flagFile.FileExists("c:\program files\someprogram\somefile.txt") Then

   'Do Nothing because it's done

Else

	Set WshShell = WScript.CreateObject("WScript.Shell")

	'nb the trailing \ avoids the prompt asking whether target is file or directory

	wshshell.run ("xcopy sourcefolder targetfolder\ /T /E")

End If 

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now