One view - two files...???
-
Well, does anybody know a way to edit one file that have two locations on the disk. For example, given the files: C:\dir1\fileA C:\dir2\fileA when i change in VS the code of dir1\fileA, and then save it - i want it to automatically replace also dir2\fileA, that is: One View, two files. Thanks in advanced, Ilan
-
Well, does anybody know a way to edit one file that have two locations on the disk. For example, given the files: C:\dir1\fileA C:\dir2\fileA when i change in VS the code of dir1\fileA, and then save it - i want it to automatically replace also dir2\fileA, that is: One View, two files. Thanks in advanced, Ilan
Assuming you know the location of the 2 files: FileInfo fi1 = new FileInfo(file1path) ; FileInfo fi2 = new FileInfo(file2path) ; //make change to file 1 //overwrite fi2 with fi1 fi1.CopyTo(fi2.FullName,true) ; //this will overwrite file 2 //note, to use the FileInfo object, make sure you are using System.IO namespace