I am trying to seed some files so we can programmatically expand our application to new servers when we need to, and lessen the load/documentation needed when training new devs.
So the files exist within the project, but there are other applications that utilize the files and for reasons beyond my control they have to be made available on the disk in a folder that we already create at the startup of our application.
I have tried a few ways to access the files to do a File.Copy with no success. Here is some of the example code of what I've tried
Directory.CreateDirectory(@"C:\appImages");
File.Copy(Path.Combine(Environment.CurrentDirectory, @"Content/Images/someFile.jpg"), @"C:\appImages\someFile.jpg", true);
and
Directory.CreateDirectory(@"C:\appImages");
File.Copy(Path.Combine(Directory.GetCurrentDirectory()), @"Content/Images/someFile.jpg"), @"C:\appImages\someFile.jpg", true);
It's worth mentioning that I'd like this to work when running the application from the exe, and also when Debugging the project locally even if I have to add more code to handle this.