Search code examples
windows-7ntfscopy-on-write

Create copy-on-write directory on Windows 7 with NTFS


I have a directory containing source code, which I compile to produce object files. I want to quickly apply a patch and rebuild in such a way that I have simultaneous access to both the old and new object files. One way to do that is:

cd old && make
xcopy old new
cd new && apply diff && make

However, the copy takes about 10 minutes, even on the same drive. If I could make new be a copy-on-write version of old that would be much faster. Can Windows 7 NTFS create copy-on-write directories? Can these directories be expanded to copy-on-write subdirectories when the outer directory is modified?


Solution

  • If you create a VHD and mount that in that directory, you can independently configure VSS on that volume and therefore on that directory.