how can i copy a file in my project resources to a temp directory using C#
i have install.bat file in my project resources folder i want to copy this into c:\ directory
how can i copy a file in my project resources to a temp directory using C#
i have install.bat file in my project resources folder i want to copy this into c:\ directory
My project can copy a dll as resource in a directory, maybe this wil work for you:
File.WriteAllBytes(@"C:\filename.extension", Properties.Resources.install);
File.Copy(@"Resources\install.bat", @"C:\directory\install.bat");
note: you should have Resources folder in Debug\bin. (if there isn't one, click on property of install.bat file in Visual Studio solution exprorer and set 'Copy to Output Directory' to 'Copy always'