folderinfo
FOLDER
,
INFO

The folderinfo statement calculates the total size of a folder, and the number of files in the folder.


Parameters

This statement has two parameters:

folder – path of folder

info – field or variable to where result will be place. The result is a dictionary with two items of information: 1) COUNT: # of files in folder, and 2) SIZE: total size of files in folder


Description

This statement calculates the total size of a folder, and the number of files in the folder. This example displays the number of files in the Pictures folder, and the average size of each picture.

local fstats
folderinfo "~/Pictures",fstats
let pictureCount = getdictionaryvalue(fstats,"COUNT")
let totalPictureSize = getdictionaryvalue(fstats,"SIZE")
message "You have "+
    pictureCount+" pictures (average size "+
    bytepattern(totalPictureSize/pictureCount)+"."

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.