[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-03-03
8
Medium Priority
?
858 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 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