OrionCookies
Programmer
Hi,
I have script to get total size of the folder. it works fine if the size of folder is under 2G, but if over 2g, i am getting Overflow: 'of.size' error.
Here is my code.
'==============================================
dim FSO, objFolder,datafolder, foldername
foldername = "c:\Data"
Set fso= CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(foldername ) Then
Set objFolder= FSO.GetFolder(foldername ) 'getting folder size objFolder.Size\par
ShowFolderDetails objFolder
Sub ShowFolderDetails(oF)
datafolder = oF.Size\1048576
end sub
wscript.echo datafolder
End If
'====================================================================
Please let me know any suggestion or help
thanks in advance
I have script to get total size of the folder. it works fine if the size of folder is under 2G, but if over 2g, i am getting Overflow: 'of.size' error.
Here is my code.
'==============================================
dim FSO, objFolder,datafolder, foldername
foldername = "c:\Data"
Set fso= CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(foldername ) Then
Set objFolder= FSO.GetFolder(foldername ) 'getting folder size objFolder.Size\par
ShowFolderDetails objFolder
Sub ShowFolderDetails(oF)
datafolder = oF.Size\1048576
end sub
wscript.echo datafolder
End If
'====================================================================
Please let me know any suggestion or help
thanks in advance