I want to copy a picture to the homegroup shared folder. I opened cmd.exe through the Start menu> Run> cmd.exe and typed:
copy C:\pic1.png \\SOMECOMP\Users\SOMEONE\Shared
Image was copied well. However, when I try to do the same with C #, like this:
System.Diagnostics.Process.Start(@"cmd.exe", @"/c start copy C:\pic1.png \\SOMECOMP\Users\SOMEONE\Shared");
I get the following message:
Access is denied.
How can i fix this?
PS - File.Copy produces the same error. For me, the cmd method looked more promising.
user350034
source
share