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.

Possible Duplicate:
How do synchronize two folders in Windows 7 in real-time?

I got a dedicated server with Windows Server 2008 OS, which I am hosting game servers off.

Now, for one of the games, it creates a file which has to be downloaded to the players that join each time the server restarts. We have enabled Fast Download which means that the files are hosted off of web hosting, which enables the players to download at max speed while if they had to download the files through the game server itself, the speed is set to maximum of 20 KB / sec which cannot be changed. Now, for ease of use, I'd like to automatically synchronize the game server cache folder (which is where the file is created) with the web hosting folder (It's hosted off of the same machine) once the new file is created.

Are there any way to do that?

share|improve this question

marked as duplicate by Dave, ChrisF, CharlieRB, Indrek, BBlake Oct 16 '12 at 13:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

Use robocopy as it can monitor the folders (from Windows 7 and 2008). It is the updated version of Xcopy really, but has more flexibility. It also only copies files which are different and to prevent copying the same data across.

/MON:n : MONitor source; run again when more than n changes seen.
/MOT:m : MOnitor source; run again in m minutes Time, if changed.

More details (and too many to post into this answer): http://ss64.com/nt/robocopy.html

Robocopy c:\sales c:\salesbu *.xls /mon:1

Edit

The robocopy monitor is not 'foolproof' by any means. If you really want some real-time monitoring solution, you may need to write a script to do so. Also, see How do synchronize two folders in Windows 7 in real-time?

share|improve this answer
    
Thank you for your quick answer! Are there any way to make it instant? Currently, there are 1 minute interval between copying. Because if the cache file isn't downloaded, the player gets an error. –  Tom Oct 16 '12 at 11:05
    
@Tom - Determine the reason a cache file has to be downloaded each time a server is restarted. This seems odd. the /mon:1 is the 1 minute delay. –  Ramhound Oct 16 '12 at 11:16
    
@Ramhound, Well, the error caused can crash the game for the player. So if the player, in any way, is abled to join the server before the cache file has been copied, his game can crash and might even overload the computer because that cache file is so important for the game to even run. I got it to work with Dsynchronize though. Thanks. –  Tom Oct 16 '12 at 11:23
    
@Tom, I admit I don't fully understand, but surely you should have things in place which ensures all processes are complete/ready before you let people join. It sounds like your proposal is very fail-dangerous. –  Dave Oct 16 '12 at 11:25

Use the built-in Windows 7 "Offline Files" feature, as mentioned in this comment to a related Lifehacker article titled How Can I Sync My Files Without Having To Store Them Online? which suggests using it to quickly sync multiple files between multiple computers.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.