0 Members and 1 Guest are viewing this topic.
function ShowFolderSize(filespec){ var fso, f, s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFolder(filespec); s = f.Name + " uses " + f.size + " bytes."; return(s);}
Function ShowFolderSize(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(filespec) s = UCase(f.Name) & " uses " & f.size & " bytes." ShowFolderSize = sEnd Function
FUNCTION ShowFolderSize (BYVAL filespec AS STRING) AS STRING LOCAL fso AS IFileSystem LOCAL f AS IFolder LOCAL s AS STRING LOCAL v AS VARIANT fso = NEWCOM "Scripting.FileSystemObject" f = fso.GetFolder(UCODE$(filespec)) v = f.Size s = ACODE$(f.Name) & " users " & STR$(VARIANT#(v)) & " bytes." FUNCTION = sEND FUNCTION