Use shared directory as read-only source of multiple distinct target directories - Windows 10

1

I have a source folder which I want to use as a starting point for multiple distinct target folders.

This can be trivially done by copy-pasting the source folder, then just using the new directories. However, this results in a copy of the source folder each time.

If I use a symlink or junction (as far as I can tell) then I can have multiple other 'directories' that have the same content as my source, but they aren't really distinct.

To clarify with an example, if I have

c:\source\sourcefile.txt

and then

c:\target1\sourcefile.txt

and create

c:\target1\target1file.txt

then my source directory will be updated to contain that same target1file.txt.

Is there some way on Windows 10 to provide a read-only copy of a directory and allow the modification of that directory in a separate location (with masking of the source files if the same file name exists in the source and target)?

I have some memory of a similar technique used with mounting on Linux, but I don't remember enough to accurately Google...

chrisb2244

Posted 2018-06-02T04:07:25.870

Reputation: 307

2No read-only is read-only. some editors allow you to automatically modify the read-only bit (like Notepad++ if run as admin) to commit a save, but otherwise there is no variation to NTFS file attributes based on mount configuration. Instead you probably want to use filesystem permissions to deny your operating user write, but to use a program or script running under a different user to create "targets" (a confusing choice of moniker) and monitor them for changes so it can propagate those changes to the template directory, perhaps updating other targets in the process or whatever. – Frank Thomas – 2018-06-02T04:41:09.717

No answers