This question has already been answered:
- How to upload a resource to a folder? C # 3 replies
In general, there is textBox1 and the bud in textBox1 should write the folder directory, in my case C: \ Users \ 1 \ Desktop \ 123, and when you click on the bud from the resources of the program, the picture png12.png should be copied into this folder, there is such a code which I found isn’t robs, tell me what the problem is? I found various articles, but nothing works
private void button1_Click(object sender, EventArgs e) { string dir = textBox1.Text; string FilePath = Application.StartupPath + "\\png12.png"; if (!File.Exists(FilePath)) { File.Copy(dir, FilePath, true); } }