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...
escme16Asked:
Who is Participating?
 
sirbountyConnect With a Mentor Commented:
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
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
escme16Author Commented:
And i need to do it between two different machines..
Example:
Copy company folder in server2 to backup folder in server3
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
All Courses

From novice to tech pro — start learning today.