Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Server
Dear Friends,
 
I have Two SERVERS, Let us say A and B.
 
Daily Textfiles will be updated and stored in Server A at morning 7:30 Am... and
now i need to copy these Server A text file to SERVER B Automatically.
 
Note : Automatically It should Copy from SERVER A to SERVER B before Morning 8:00 AM.
 
Please can anyone help me.
Posted 7-May-12 23:51pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This article help you to run batch file for every 'X' hours once
 
http://www.windowsitpro.com/article/configuration/how-can-i-configure-a-program-batch-file-to-run-every-x-minutes-[^]
 
The following script maps a drive to both machines using x and z.
First checks for a connection and if found removes, maps the drive - if there is a password needed a prompt will ask for a username and password for the machine to connect with, the script will copy the file then remove the mapped drive.
If you need to automate the username and password use:
net use x: \\172.25.0.71\c$ /user:domainorcomputername\username password | theuserpassword
Here is the script:
@echo off
if exist x: (net use x: /delete)
if exist z: (net use z: /delete)
net use x: \\172.25.0.71\c$
net use z: \\virtus\dbbackups\
copy z:\tpos_Wednesday.gbk x:\
if exist x: (net use x: /delete)
if exist z: (net use z: /delete)
For help with the commands type:
net use /? 
at the command prompt.
Good luck.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 290
1 OriginalGriff 275
2 Sergey Alexandrovich Kryukov 195
3 BillWoodruff 140
4 ProgramFOX 140
0 OriginalGriff 6,524
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,218
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 8 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100