解决VB6直接用FILELEN无法获取超过2G大小的文件
方法一:
Dim fso
Set fso = CreateObject(“Scripting.FileSystemObject”)
a1 = fso.GetFile(“D:\锐起无盘4\server1\Virtual Hard Disks\server2012锐起4.vhdx”).Size
MsgBox a1
方法二:
引用 Microsoft Scripting Runtime
'利用FSO对象获得大文件的大小 需引用 Microsoft Scripting Runtime
Function GetFlen(ByVal FpathName As String) As Double
Dim fso As New FileSystemObject
GetFlen = fso.GetFile(FpathName).Size
End Function