Trying to use a batch file to automatically move a file from one machine to another.

I have a Windows 2003 Server with a mapped drive to a WindowsNT machine.
Everynight - an Alpha server dumps a big backup file on that NT Machine. I need to have it moved automatically to the Server2003 unit.

Any suggestions?
jimmysupportAsked:
Who is Participating?
 
Jay_Jay70Connect With a Mentor Commented:
Hi jimmysupport,

use robocopy
http://www.ss64.com/nt/robocopy.html

Cheers!
0
 
jimmysupportAuthor Commented:
Does this look right to tell Robo to move the file *.bck at 6 am?

If it is - where to I put this syntax to be sure it runs?
0
 
jimmysupportAuthor Commented:
OOps forgot to paste the syntax:

ROBOCOPY z:\ f:\alpha  [*.bck] [/mov //RH:0600]
0
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!

 
Jay_Jay70Commented:
are you wanting to move or copy the data??
0
 
jimmysupportAuthor Commented:
I want to move the file at 6 in the morning every morning.- overwriting the old file.
0
 
Jay_Jay70Commented:
you dont need the   [ ] options in there
0
 
jimmysupportAuthor Commented:
then how does it know to move the file at a special time?
0
 
jimmysupportAuthor Commented:
Or are you saying just take the brackets out?
0
 
Jay_Jay70Commented:
your syntax isnt bad so far but you jsut dont need the [] switches

ie  

ROBOCOPY z:\ f:\alpha *.bck /mov //RH:0600
0
 
jimmysupportAuthor Commented:
Ok - so where do I put this command to be sure it fires each morning?
0
 
Jay_Jay70Commented:
you need to create a scheduled task

put it in a notepad file - name it backup.vbs  or whatever

then add it as a scheduled task - i would take out the time swtich and just let the scheduled task handle it
0
 
jimmysupportAuthor Commented:
Scheduled tasks?
0
 
Jay_Jay70Commented:
start menu - programs - accessories - system tools - scheduled tasks

lets you create whatever you like daily, monthly, weekly. yearly, use that
0
 
Jay_Jay70Commented:
you can put your vbs file anywhere and then add it as a task

make sure the file works first   test it on some other files
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.

All Courses

From novice to tech pro — start learning today.