Hello, i Recently Tried to copy a simple txt File To my Pc From My apps resources, But i get errors ect, Is this even possible?
i was using

System.IO.File.Copy(svchost.Properties.Resources.Textfile, @"C:\", true);

Recommended Answers

All 8 Replies

Yes, you can, if you running on Windows Vista be sure to run this on administrative mode. Please include any error message appears.

Errors are always useful...

Hmmmm, i just tried to type in the Code again To Copy the error message, but for some reason it Wont execpt the code, its like Resources doesnt exist anymore

Did you add the file in as a resource? And call it the same name etc?

Yes, tried re-adding it but it wont work

Shudda saved your code last time then ... As you've not mentioned any errors etc, Im sure you'll work it out ..

Yes i always seem to in the end

Did you create the file(File.Create) before you did a copy?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.