ma questa
codice:
Function PesoCartelle(ByVal strPercorso)

   Dim fso
   Dim rootFolder
   Dim subFolders
   Dim Folder
   Dim Files
   Dim File
   PesoCartelle = 0

   Set fso = Server.CreateObject("Scripting.FileSystemObject")
   strPercorso = Server.MapPath(strPercorso) 
   Set rootFolder = fso.GetFolder(strPercorso)
   PesoCartelle = Round((rootFolder.size/1024/1024), 2) 
   Set rootFolder = Nothing
   Set fso = Nothing
non va bene?