This project is read-only.

Error: Could not find file when trying to unzip

Sep 24, 2015 at 10:03 AM
Hi, I download a zipfile from an Internet source and I store it in a folder. Then I call the Unzip sub-routine and it than I get this error: Could not find file...

This is the calling statement:

UnzipFromFile("\inetpub\wwwroot\MyModule\Portals\0\SensorFiles\LocationID#" & TextBox_Objects13_ObjectLocation0_ID_LSOB.Text & "RCA" & TextBox_Objects9_Object_SQLSEL_SQLSRTA_GRD_OCSCD_LKTRID_FBN_NXTWFL.Text & ".zip", "c:\inetpub\wwwroot\MyModule\Portals\0\SensorFiles\")

This is the sub:
Public Sub UnzipFromFile(ByVal zipFileIn As String, ByVal outFolder As String)
    strTraceCode = "#00;"
    '================  Start TraceLog  ================
    strItem = " #00; Special Functions: UnzipFromFile"
    strDetail = "Unzip file(s): " & zipFileIn
    strResult = "To folder: " & outFolder
    TraceLog(strModule, strItem, strDetail, strResult)
    '=================  End TraceLog  =================
        Dim ZipToUnpack As String = zipFileIn
        Using zip1 As ZipFile = ZipFile.Read(ZipToUnpack)
            Dim e As ZipEntry
            For Each e In zip1
                 e.Extract(outFolder, ExtractExistingFileAction.OverwriteSilently)
        End Using
    Catch Exc As System.Exception
        mErrMessage += " " & Exc.Message
        '================  Start TraceLog  ================
        strItem = "### ERROR; TraceCode: " & strTraceCode & "; Special Functions: UnzipFromFile"
        strDetail = "Unzip error"
        strResult = "### ERROR: " & mErrMessage
        TraceLog(strModule, strItem, strDetail, strResult)
        '=================  End TraceLog  =================
    End Try
End Sub
This is the errorlog:

ERROR; TraceCode: #00;; Special Functions: UnzipFromFile; Detail: Unzip error; Result: ### ERROR: -1 Could not find file 'C:\inetpub\wwwroot\MyModule\Portals\0\SensorFiles\'.

My question:
1st: Why is this file not found?
2nd: What should I do to to resolve this error; other words: do I need to insert the folder's path?