FSO操作文件系统

2019-04-02 20:54:09王旭

                oFileInfo.FileSize = iFormStart -iInfoEnd -2
                oFileInfo.FormName = sFormName
                file.add sFormName,oFileInfo
            Else
                'If it's form item
                tStream.Close
                tStream.Type = 1
                tStream.Mode = 3
                tStream.Open
                oUpFileStream.Position = iInfoEnd 
                oUpFileStream.CopyTo tStream,iFormStart-iInfoEnd-2
                tStream.Position = 0
                tStream.Type = 2
                tStream.Charset = "UTF-8"
                sFormvalue = tStream.ReadText 
                If Form.Exists (sFormName) Then
                    Form (sFormName) = Form (sFormName) & ", " & sFormValue
                Else
                    Form.Add sFormName,sFormvalue
                End If
            End If
            tStream.Close
            iFormStart = iFormStart+iStart+2
            'Exit at end of file