怎么把一个10M的文本文档,分成10个1M大小的文本文档?用VB编写程序!
2个回答
展开全部
Private Sub Command1_Click()
Dim arr(1 To 1024# * 1024) As Byte
i = 1
Open "E:\0.txt" For Binary As #1
Do While Not EOF(1)
Get #1, , arr
Open "E:\" & i & ".txt" For Binary As #2
Put #2, , arr
Close #2
i = i + 1
Loop
Close #1
End Sub
Dim arr(1 To 1024# * 1024) As Byte
i = 1
Open "E:\0.txt" For Binary As #1
Do While Not EOF(1)
Get #1, , arr
Open "E:\" & i & ".txt" For Binary As #2
Put #2, , arr
Close #2
i = i + 1
Loop
Close #1
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询