(04-08-22, 11:58 PM)سعود كتب :اخي الفاضلاخواني الكرامهل فيجوال بيسك يمكنها تقسم ملف؟
احاول صيغة اجراء تقسيم ملف فما هو الخطا هنا:PHP كود :
Dim folderpath As String = IO.Path.GetDirectoryName(fpath) & "\"
Dim sf As String = IO.Path.GetFileNameWithoutExtension(fpath)
Dim fstream As New FileStream(fpath, FileMode.Open)
Dim fl As New IO.FileInfo(fpath)
Dim fcount As Integer = fl.Length
Dim f1 As Integer = (fcount / 3)
Dim bw As BinaryWriter
Dim br As BinaryReader
br = New BinaryReader(fstream)
Using fs As New FileStream(folderpath & sf & "_0", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), 0, f1)
End Using
Using fs As New FileStream(folderpath & sf & "_1", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), f1, f1)
End Using
Using fs As New FileStream(folderpath & sf & "_2", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), f1 + f1, f1)
End Using
بالنسبة للسؤال هل فيجوال بيسك يمكنها تقسم ملف؟, بحثت وو جدت مثال لذلك مرفق
(05-08-22, 01:34 AM)asmarsou كتب :(04-08-22, 11:58 PM)سعود كتب :اخي الفاضلاخواني الكرامهل فيجوال بيسك يمكنها تقسم ملف؟
احاول صيغة اجراء تقسيم ملف فما هو الخطا هنا:PHP كود :
Dim folderpath As String = IO.Path.GetDirectoryName(fpath) & "\"
Dim sf As String = IO.Path.GetFileNameWithoutExtension(fpath)
Dim fstream As New FileStream(fpath, FileMode.Open)
Dim fl As New IO.FileInfo(fpath)
Dim fcount As Integer = fl.Length
Dim f1 As Integer = (fcount / 3)
Dim bw As BinaryWriter
Dim br As BinaryReader
br = New BinaryReader(fstream)
Using fs As New FileStream(folderpath & sf & "_0", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), 0, f1)
End Using
Using fs As New FileStream(folderpath & sf & "_1", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), f1, f1)
End Using
Using fs As New FileStream(folderpath & sf & "_2", FileMode.Append)
bw = New BinaryWriter(fs)
bw.Write(br.ReadBytes(fcount - 1), f1 + f1, f1)
End Using
بالنسبة للسؤال هل فيجوال بيسك يمكنها تقسم ملف؟, بحثت وو جدت مثال لذلك مرفق

