wasabi3689
asked on
auto copy
Hi,
I have two Windows 2008 servers ( A and B) in the same domain, they are connected to each other. I have some file in A, I want to have a schedule copying them to B daily. But when I browse the Windows backup. I don't see them connected to network drive but all local drive. So, how to make a auto copy daily from one machine to another machine?
I have two Windows 2008 servers ( A and B) in the same domain, they are connected to each other. I have some file in A, I want to have a schedule copying them to B daily. But when I browse the Windows backup. I don't see them connected to network drive but all local drive. So, how to make a auto copy daily from one machine to another machine?
Your could create a batch file to copy the files and then create a scheduled task to run the batch file at set intervals.
Use below steps:
Create a batch file and add below command in it:
xcopy source destination /e
where,
Source : server A (path from where data to be copied)
Destination : server B (path on which data to be copied)
Now create a schedule task and add this above batch file to this task with the time as per requirement. Thats it. All done..
Create a batch file and add below command in it:
xcopy source destination /e
where,
Source : server A (path from where data to be copied)
Destination : server B (path on which data to be copied)
Now create a schedule task and add this above batch file to this task with the time as per requirement. Thats it. All done..
ASKER
the batch file is located in A or B? the file is called xxx.bat?
the following is correct for my batch file?
xcopy \\A\NewBackup\ \\B\NewBackup /e
If I want to copy all files with a name including a string " customer" only, how to do that?
can I say like below?
xcopy \\A\NewBackup\*customer* \\B\NewBackup /e
Also, what does "/e" mean?
the following is correct for my batch file?
xcopy \\A\NewBackup\ \\B\NewBackup /e
If I want to copy all files with a name including a string " customer" only, how to do that?
can I say like below?
xcopy \\A\NewBackup\*customer* \\B\NewBackup /e
Also, what does "/e" mean?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how to do copy only certain files like all files includes string with *customer*?
ASKER
another question
how to do copy only the latest one with string customer name for the file. for example, I have several files named *customer*
customer123 12/3/2013
customer234 12/5/2013
customer456 12/6/2013
So, I only want to copy customer456 since this is the latest one.
How to do that?
how to do copy only the latest one with string customer name for the file. for example, I have several files named *customer*
customer123 12/3/2013
customer234 12/5/2013
customer456 12/6/2013
So, I only want to copy customer456 since this is the latest one.
How to do that?
you can add one more switch in the script
/D:m-d-y
These switch Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/D:m-d-y
These switch Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.