Hi,
I would like to programatically delete a file that has been downloaded as
read only. Obviously when you try and delete it 'normally' with
File.Delete(filename) it throws an exception (as you would expect). My
immediate thought is that I should change the attributes associated with the
file to RW before attempting the delete BUT I cannot find how to do this in
code with win CE. Any/all clues/solutions greatfully recieved.
Platform is IPAQ pocketPC. application mainly in VB.Net.
thanks for your time
regards
Bill
p.s. this was originally incorrectly posted in embedded VB forum and has
been moved here.

RE: How to delete Read only file? by a

a
Wed Mar 01 13:35:14 CST 2006

Take a look at this thread:

http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_frm/thread/6c375cbac2f36b97/034723bdbef002df?lnk=st&q=change+file+attributes+c%23+group%3A*.compactframework&rnum=1&hl=en#034723bdbef002df


--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


"Bill" wrote:

> Hi,
> I would like to programatically delete a file that has been downloaded as
> read only. Obviously when you try and delete it 'normally' with
> File.Delete(filename) it throws an exception (as you would expect). My
> immediate thought is that I should change the attributes associated with the
> file to RW before attempting the delete BUT I cannot find how to do this in
> code with win CE. Any/all clues/solutions greatfully recieved.
> Platform is IPAQ pocketPC. application mainly in VB.Net.
> thanks for your time
> regards
> Bill
> p.s. this was originally incorrectly posted in embedded VB forum and has
> been moved here.