Theres a bug in my code for recieving remote directory list.. For some reason it seems to put an "F" at the end of the file name and I also can't access this file. I hope someone can help cause I've been banging my head over this... You can see screenshots and download the project here:http://www.shepstype-r.com/rfm_error/index.php
I think this is where it is...
Thanks for any help or comments/suggestions!!!!!VB Code:
Public Sub ChangeDirectory(ByVal NewDirectory As String) ' "CHG"/Directory If Not bCon Then Exit Sub If Len(NewDirectory) = 0 Then Exit Sub Dim sPacket As String sPacket = "CHG" & DELIM & NewDirectory frmMain.sckMain.SendData sPacket & EOP End Sub Public Sub ParseChangeDirectory(ByVal Data As String) On Error Resume Next ' Successfull: "CHG"/"Directory"/D:Folder1|F:File1*123|F:File2*123 ' Folder doesn't exist: "CHG"/"Directory"/"NonExist" Dim sBuff() As String: sBuff() = Split(Data, DELIM) If sBuff(2) = "NonExist" Then frmMain.StatusBar.SimpleText = "Status: Error changing directory; directory does not exist." Exit Sub Else sCurDir = sBuff(1) frmMain.txtCurDir.Text = sCurDir Dim sDir() As String, sType() As String, lLoop As Long, sTmpDir As String, sSize() As String sDir() = Split(sBuff(2), "|") With frmMain .TVDir.Nodes.Clear .LVFile.ListItems.Clear For lLoop = 0 To UBound(sDir) sTmpDir = sDir(lLoop) If Len(sTmpDir) > 0 Then sType() = Split(sTmpDir, "*?*") If sType(0) = "D" Then .TVDir.Nodes.Add , , sType(1), sType(1), "Dir" ElseIf sType(0) = "F" Then sSize() = Split(sType(1), "*") .LVFile.ListItems.Add , , sSize(0), , "FN" .LVFile.ListItems(.LVFile.ListItems.Count).ListSubItems.Add , , BytesToKB(CDbl(sSize(1))) .LVFile.ListItems(.LVFile.ListItems.Count).ListSubItems(1).Bold = True End If End If Next lLoop .LVFile.Refresh End With End If End Sub
$hep




Reply With Quote