B4R Question number of files in folder or folder size

Mostez

Well-Known Member
Licensed User
Longtime User
Hello,
I need to get number of files in folder or get total folder size in bytes, user data files(stores ID, Name...etc) are located in 'dat' folder with 101 bytes of size each, something like

SD.folder('dat').filecount or SD.folder('dat').size

EDIT:
is it OK to use it like this?
B4X:
For Each f As File In Sd.ListFiles("dat") ' count files in folder
        NumberOfFiles = NumberOfFiles + 1
Next

thanks
 
Last edited:
Top