Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to create a batch file for Task Scheduler runs every hour on taking following actions.

  1. File "apple" in Folder "fruits" at Server A on IP Address/Network A.
  2. File "apple" in Folder "fruits" at Server B on IP Address/Network B.
    1. File "apple" from Server A will transfer/copy to Server B and rename as File "apple_bk".
    2. File "apple" from Server B will rename into File "apple_20130101_bak". (combine time-stamp)
    3. File "apple_bk" in Server B will rename back into File "apple".

Both servers are Windows Server.

Above are in different networks, so how to connect by using command line and transferring the file?

share|improve this question
please describe exactly what you mean by they 'are in different networks'. are they in different domains that are directly connected, or does the data have to cross the internet to get from one network to the other? if they are directly connected and you are using NetBIOS over TCP/IP, then I'd use Robocopy. if the internet is between the two servers however, you either need to use an internetwork protocol like http/ftp or a tunneling protocol like ssh/vpn to connect to the remote network first. –  Frank Thomas Sep 9 '13 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.