Problem with previleges with fileInfo/directoryInfo objects for moving a file

sb_rkarnati

Member
Joined
Dec 20, 2007
Messages
6
Programming Experience
10+
Hi,

We have a situation where we need to 'move' a file from one location to another. We are using the moveTo method of fileInfo class for this. But the issue with this is that when we execute it, the file, after it has been moved to the destination folder retains the previleges of the source folder whereas it should have gotten the previleges of the destination folder. copyTo method of the same object does not have this problem.

One alternative is to use the copyTo method and then delete method but that becomes a little risky and we do not want to go that route.

Any ideas how we could acheve 'moving' a file in VB.NET without using the fileInfo.moveTo()?

Responses will be greatly appreciated.

Thanks
sb_
 
Back
Top