Solved

COPYING FILES OVER NETWORK

Posted on 2004-04-05
9
539 Views
Last Modified: 2010-05-18
CAN SOMEONE GIVE ME A QUICK SCRIPT OR SOLUTION ON HOW TO COPY A FOLDER FROM ONE COMPUTER TO ANOTHER OVER THE NETWORK...
0
Comment
Question by:escme16
  • 4
  • 3
  • 2
9 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 10759710
xcopy c:\myfolder\*.* /e /s /v \\myserver\sharename
0
 

Author Comment

by:escme16
ID: 10759743
is there anyway to automate this script... And does this have to be run from DOS?
0
 

Author Comment

by:escme16
ID: 10759767
And i need to do it between two different machines..
Example:
Copy company folder in server2 to backup folder in server3
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 175 total points
ID: 10759790
Create a script:

-----bakitup.cmd-----
@xcopy c:\myfolder\*.* /e /s /v \\myserver\share
--------------------

Customize it for both - save it under %systemroot%\system32 (i.e. c:\windows\system32)

Now, simply schedule it from control panel - scheduled tasks to run when you need it to...
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 23

Expert Comment

by:rhandels
ID: 10759801
Hello,

The option given by sirbounty is the correct one in dos. The only one to automate it. What you can do is create a file in notepad and name it copy.bat where the bat file is important. This is a batch file. In the bat field put the xcopy..... frase. You can use the scheduled task feature to schedule the batch file copy.bat. And then it is a "windows" feature....
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10759836
rhandels,
Good explanation - except you shouldn't name a batch/script file the same as any internal command...it'll only cause problems later... :D

How will your system know to run copy.bat versus the internal copy in the command interpreter?  The internal one will be seen first and give you a syntax error...
0
 
LVL 23

Expert Comment

by:rhandels
ID: 10759985
you're right.... eh what else is new here. Points to you sirbounty......
0
 

Author Comment

by:escme16
ID: 10759992
I tried the whole scheduled task thing after creating the .bat script but doesn't seem to be working.. i get a 0X4 result...
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10765239
Try this:

CMD /K xcopy c:\myfolder\*.* /e /s /v \\myserver\share

It should leave a window open and you can diagnose for any errors...
0

Featured Post

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

Join & Write a Comment

Let’s list some of the technologies that enable smooth teleworking. 
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
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…
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…

757 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

23 Experts available now in Live!

Get 1:1 Help Now