We have a web service that creates a folder structure for our projects and as part of the this I need to create a text file that has the path to the project. I've created a template text file with a dummy path that I will replace when creating the file. e.g
//XXXXXXXX/projects/
Now the question is, what is the optimal way to create the file on a network share from my template and update the path? I think I have two options:
open template file, get content as a string, replace the xxxxxxxx and then create a new text file on the network share
copy the template file to the network share, open, get the content as a string, replace the xxxxxxxx and save back