1
Answer

Move content from one directory into another directory

Manoj Bisht

Manoj Bisht

16y
2.6k
1
Hello Friends,

I want to copy the contents(subdirectories and files) from source folder into destination folder.

Here is my code ...........

DirectoryInfo dir=new DirectoryInfo(MapPath(".")+"\\"+"Images");
dir.MoveTo(MapPath(".")+"\\"+"Hello");



and also I've set <identity impersonate="true" /> in web.config

The error i'm getting is given below...

Access to the path "c:\inetpub\wwwroot\Rough\Images" is denied
Answers (1)