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
. لكني اطلعت عليه اكثر من مرة ولانه غير انجليزي لم اتمكن من فهم المسميات.