?
Solved

how to automatically copy files from network computers to server (xcopy)

Posted on 2011-03-03
8
Medium Priority
?
855 Views
Last Modified: 2012-05-11
We are running a small network with four computers. Some of our employees often forget to save the files to a certain folder that they are assigned to which is linked to our server(share folder). Recently one of our computer crashed and we lost some files because those were saved on desktop and not to the share folder.So is there any way we can get any software or anything that will automatically copy files from every user profiles and copy it to our server.

I am trying the xcopy option but unable to get it work.


xcopy C:\Documents and Settings\My Documents\network computername\network name\destination folder on server/drive name
Please let me know if i am doing anything wrong here. Also let me know how to run it,as after creating name.bat file it does not run.

0
Comment
Question by:shahedny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 6

Expert Comment

by:rnicolaus
ID: 35031352
First make sure you have a drive mapped to the destination (I'm using Z in the example).  Then run the command with these switches:

xcopy c:\(your date source path)\  Z:\(user path)\ /M /S /E /C /I /R /Y

M = Only copies files with Archive bit on & sets Archive bit off
S = Includes subdirectories
E =  Includes subdirectories incl. empty ones
C = Continues even with errors
I = If destination does not exist and more than 1 file assumes it's a directory
R = Overwrites existing read only files
Y = Overwrites existing files and supresses the "Y" usually needed to confirm

You may want to only include files that have change or are new.  In that case you need to use the /M which copies only the ones that have the Archive attribute set, then turns it off after it copies.  This way you cut down on the network traffic and time it takes to run this script.
0
 
LVL 6

Expert Comment

by:rnicolaus
ID: 35031381
I forgot to add - Firstly run this version without the M

xcopy c:\(your date source path)\  Z:\(user path)\  /S /E /C /I /R /Y
0
 

Author Comment

by:shahedny
ID: 35031493
can you give me the exact code for that please:
copy my documents and desktop files from computer frontright to  abcserver  network abc drive D folder frontright
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Expert Comment

by:rnicolaus
ID: 35031525
Well, I would need your paths:  

Desktop Windows version, Username, etc.

Server folder drive mapped letter and folder that user has access to.
0
 

Author Comment

by:shahedny
ID: 35031585
network computers are running on xp. name of the computer is frontright.(need to copy all the my documents files together with the desktop files) to the server. Network name is PVEST . Server name is pvserver. Destination folder is frontright located at D drive of the server.
0
 
LVL 6

Accepted Solution

by:
rnicolaus earned 1200 total points
ID: 35031665
From what I can determine, here's the batch file:
----------------------------
net use z: /delete
net use z: \\pvserver\d$
xcopy "c:\documents and settings\PVEST\My Documents\"  Z:\frontright\ /M /S /E /C /I /R /Y
xcopy "c:\documents and settings\PVEST\Desktop\"  Z:\frontright\ /M /S /E /C /I /R /Y
-------------------

 (<<The d$ may need to be changed to a shared folder name with user PVEST allowed to read/write/delete>>)

This is the 'first run' batch file without the /M switch
----------------------------
net use z: /delete
net use z: \\pvserver\d$
xcopy "c:\documents and settings\PVEST\My Documents\"  Z:\frontright\ /S /E /C /I /R /Y
xcopy "c:\documents and settings\PVEST\Desktop\"  Z:\frontright\ /S /E /C /I /R /Y
-------------------


 
0
 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 800 total points
ID: 35031757
Other options.

MS has the free Sync Toy V

Free MS tool ; SyncToy v2.0 Sync Toy v2.0 synch toy
http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&displaylang=en

has automated syncing.

I hope this helps !
0
 
LVL 12

Expert Comment

by:Dave
ID: 35032743
I use robocopy from the rkkit tools (do a google search for robocopy download) but xcopy is OK.

use the environment variables to build the strings

so

xcopy /s %userprofile%\my documents\*.* \\servername\sharename\

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This program is used to assist in finding and resolving common problems with wireless connections.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

752 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