• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

COPYING FILES OVER NETWORK

CAN SOMEONE GIVE ME A QUICK SCRIPT OR SOLUTION ON HOW TO COPY A FOLDER FROM ONE COMPUTER TO ANOTHER OVER THE NETWORK...
0
escme16
Asked:
escme16
  • 4
  • 3
  • 2
1 Solution
 
sirbountyCommented:
xcopy c:\myfolder\*.* /e /s /v \\myserver\sharename
0
 
escme16Author Commented:
is there anyway to automate this script... And does this have to be run from DOS?
0
 
escme16Author Commented:
And i need to do it between two different machines..
Example:
Copy company folder in server2 to backup folder in server3
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
sirbountyCommented:
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
 
rhandelsCommented:
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
 
sirbountyCommented:
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
 
rhandelsCommented:
you're right.... eh what else is new here. Points to you sirbounty......
0
 
escme16Author Commented:
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
 
sirbountyCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now