Home All Groups Group Topic Archive Search About

DirectoryInfo, MoveTo method

Author
20 Jan 2006 7:56 PM
AE Guy
I have a windows service written in C# that WAS moving files individually. 
Now I am trying to make it move entire directories.  When trying to use the
DirectoryInfo.MoveTo() method I am getting a "access to the path is denied"
exception.  This is being developed on the local system, service is starting
up with the local system account, and it work fine when using
FileInfo.MoveTo().

Any advice would be appreciated.

Author
31 Jan 2006 8:50 PM
Harish Shikhare
Please make sure that this directory is not used by any other application
such as command console or Explorer
--
Harish Shikhare



Show quote
"AE Guy" wrote:

> I have a windows service written in C# that WAS moving files individually. 
> Now I am trying to make it move entire directories.  When trying to use the
> DirectoryInfo.MoveTo() method I am getting a "access to the path is denied"
> exception.  This is being developed on the local system, service is starting
> up with the local system account, and it work fine when using
> FileInfo.MoveTo().
>
> Any advice would be appreciated.

AddThis Social Bookmark Button