I'm looking for a RAM disk (preferably free) which gets its contents from a specified folder on the hard disk and also writes changes made to it back to that folder. Is there such a thing for Windows?
I would go with VSuite Ramdisk. Unfortunately it's shareware (50$).
It supports (almost) realtime syncing to hard disk.
Fundamental problem with truly realtime sync would be huge performance loss. If syncing would be synchronous, RAM disk writing speed would be same as with hard disk. Reading speed would be faster though.
For those looking for a free alternative, you can achieve something similar by creating a RAM disk through ImDisk and then following the steps I outlined here: Keeping HDD files in virtual memory without changing paths to files.
Check the linked answer for a working batch script example.
Syncing would be on-demand only, which is the best option performance-wise. Eventually one could get automatic sync by writing data back to disk every, say, 15 minutes (e.g. through a scheduled task).