Add this code right before your delete code if the file is read only.

Code:
System.IO.File.SetAttributes("insert path here", System.IO.FileAttributes.Normal)
there are other ways to do it, but this is the simplest way.