string ls_FileName,lb_FileDatas,lb_FileData
long ll_FileLen,ll_Handle,ll_Loop,ll_Bytes,ll_Loops,ll_NewPos
ls_filename='e:\data.txt'
//统计总容量
ll_FileLen = FileLength(ls_FileName)
If ll_FileLen < 0 Then
MessageBox("提示!","文件" + ls_FileName + "不存在或正在使用!")
return
End If
ll_Handle = FileOpen(ls_FileName,StreamMode!,Read!,LockRead!)
If ll_FileLen > 32765 Then ll_Loops = ((ll_FileLen - 1) / 32765) + 1
For ll_Loop = 1 To ll_Loops
ll_Bytes = FileRead(ll_Handle,lb_FileData)
lb_FileDatas = lb_FileDatas + lb_FileData
ll_NewPos = ll_NewPos + ll_Bytes
FileSeek(ll_Handle,ll_NewPos,FromBeginning!)
Next
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步