One last note, I have just tried this method, and the file downloaded the way that I hoped it would:
''Now go get each file we just foundForEach sfile In dlist fname = sDirRemote + sfile sDestFile = sDirLocal + sfileDim oOutput = New System.IO.FileStream(sDestFile, System.IO.FileMode.Create)Dim thebytes = sf.ReadAllBytes(fname)Dim iOffset As Int32 = 0 oOutput.Write(thebytes, 0, thebytes.Length) oOutput.Close() oOutput.Dispose()Next sf.Disconnect() files = dlist.ToArray()
I don't know why getting the data into a byte array and writing would produce a different result than the DownloadFile method, but I am happy it is working. If you have any insights I would appreciate your opinion.
Thank you