Quantcast
Viewing all articles
Browse latest Browse all 27419

[RESOLVED] Help Please - Unable to delete a file

Hi All,

I am unable to delete a file using VB but I am able to delete it manually in explorer.

I tried adding a Manifest File to my project with this line and it did not work.

Code:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Here is my code. Very simple...
Code:

        Try

            If File.Exists(FTPInputputFile) Then
                File.Delete(FTPInputputFile)
            End If

        Catch ex As Exception
            MessageBox.Show("Error trying to delete file" + vbCrLf + FTPInputputFile + vbCrLf + _
                            "Insufficient Permissions, Please delete the file" + vbCrLf + _
                            FTPInputputFile + vbCrLf + "Before continuing")

            MessageBox.Show("Error returned from system: " + vbCrLf + ex.Message + vbCrLf + ex.ToString)
            Exit Sub
        End Try

Here is the full error I received..

Image may be NSFW.
Clik here to view.
Name:  Error.jpg
Views: 50
Size:  92.4 KB
Attached Images
Image may be NSFW.
Clik here to view.
 

Viewing all articles
Browse latest Browse all 27419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>