scripting@wanadoo.nl




GetFolderSize()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
9 January 2002 GetFolderSize()
AuthorScriptLogic Corporation
Action Return the total bytes consumed by the files in a folder tree.
SyntaxGetFolderSize ("path") 
Parameters
  • path (Required / String) The complete path to the folder. 
  • RemarksGreat example of using COM within a UDF. 
    ReturnsReturns a number representing the total number of bytes consumed by the files located within the folder and its subfolders. 
    DependenciesNone. 
    Examples
    $result = GetFolderSize("c:\temp")
    
     
    Source
    FUNCTION GetFolderSize ($path)
      DIM $fso, $fold
      $getfoldersize = -3
      IF Exist($path) = 1
        $fso = CreateObject("scripting.filesystemobject")
        $fold = $fso.getfolder($path)
        $getfoldersize = $fold.size
        EXIT(0)
      ELSE
        EXIT(3)
      ENDIF
    ENDFUNCTION ; - GetFolderSize -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 20 May 2003


    Site Meter