Skip to main content


Command Description

Specify a folder path to obtain the size of all files contained in the corresponding folder in bytes

Command Prototype

iRet = File.FolderSize(sPath)

Parameter Description

sPathTruepath'''C:\Users'''To obtain the folder path of the list, you can fill in the absolute path or use @ res "path" to represent the path under the res folder of the current process. The path separator needs to be escaped, such as "C:\Laiye RPA" or @res"Laiye RPA\Laiye RPA"


iRet,The variable used to save the output of the command.


/********************************Get folder size ************* ******************** 
Command prototype:
iRet = File.FolderSize('''C:\Users''')
Input parameters:
sPath--the folder path where you need to get the size
Outgoing parameters:
iRet--The result after the command is run
Dim sPath='''C:\Users\Chance\Desktop\testFile'''
iRet = File.FolderSize(sPath)