CountDirectoryEntries

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 888
Joined: Mon Sep 06, 2010 1:02 pm

CountDirectoryEntries

Post by Juan Carlos »

I have problem with this instruction, I don't understand how give the result of numeber of directories from one folder, it the instruction is:
n = CountDirectoryEntries(id[, what])

Where the id is the number of file and for default it got the number of files #COUNTFILES, how I do
to get the folders using the #COUNTDIRECTORES paramater if I did this:

OpenDirectory(1, "Cache/___IndexedDB/v1/")
numcarpetas=CountDirectoryEntries(1, #COUNTDIRECTORES)
CloseDirectory(1)

But with this I got this message: Constant not found!
I try to put the #COUNTDIRECTORES these ways:
CountDirectoryEntries(1, {#COUNTDIRECTORES})
CountDirectoryEntries(1, {what=#COUNTDIRECTORES})
CountDirectoryEntries(1, "#COUNTDIRECTORES")
neither by bored the instruction has worked, where is my fault?
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: CountDirectoryEntries

Post by jPV »

It's an error in the documentation. Add an I letter there:
numcarpetas=CountDirectoryEntries(1, #COUNTDIRECTORIES)
User avatar
Juan Carlos
Posts: 888
Joined: Mon Sep 06, 2010 1:02 pm

Re: CountDirectoryEntries

Post by Juan Carlos »

Thank you, for your help, yes, the problem was the lack of I letter, curiosly the guide in english also has this problem.
Post Reply