# Automatically copy/sync updated directory to another folder in Windows 8?

So I have a Git repo on my local (Windows 8) drive and within it are several projects, each with their own sub-dir. I want to setup something such that as I update/save files within this one particular project, this process maintains a synced copy in another location/directory. If this was Linux I'm sure this would be easily doable with a cronjob, but I have no clue how to do something like this in Windows 8. How do I maintain an auto-synced copy?

-
Would a junction point/symbolic link work for you? –  and31415 Feb 10 '14 at 1:00
I think, yes, that should work –  Kurt Wagner Feb 10 '14 at 1:06
Basically you don't really copy anything that way, but just access the target folder from a different path. For example you could use the following command: mklink /j "C:\another\folder" "C:\repo\folder" (the syntax is mklink /j "<junction point>" "<target folder>"; quotes are required to avoid issues with space characters; junction points are only supported on local NTFS drives). –  and31415 Feb 10 '14 at 1:12
Sweet thanks, it worked. Post that code as an answer so I can properly attribute and give you points. –  Kurt Wagner Feb 10 '14 at 1:20

# Possible solution

Use junction points/symbolic links: nothing gets actually copied, and you just access the target folder from a different path. For example you could use the following command:

mklink /j "C:\another\folder" "C:\repo\folder"


The syntax is:

mklink /j "<junction point>" "<target folder>"


Quotes are required to avoid issues with space characters.

## Known limitations

• Junction points and symbolic links are only supported on NTFS.

• You can't create junction points targeting remote shares. In such cases you have to create a symbolic link instead. Symbolic links were introduced with Windows Vista, but are also available in Windows XP through third-party filter drivers. For Vista and later, the syntax is the following:

mklink /d "symbolic link" "X:\path\to\target\folder"


Note Per default system settings, only users in the Administrators group can create symbolic links.

-

Try SyncToy. The only problem is that this cannot be scheduled. But perfectly does sync the files over multiple locations.

-