[Zope] How to count files in a folder?

Oliver Bleutgen Oliver Bleutgen <myzope@gmx.net>
Tue, 18 Sep 2001 15:32:10 +0200


> I want to count the number of files within a folder (the folder does not
> have subfolders), so I can say "This folder countains ## pictures". How
> can
> that be done?

Hi,

<dtml-var "_.len(foldername.objectValues())">

or in an dtml-method in that folder (or aquired into that folder)

<dtml-var "_.len(objectValues())">

cheers,
oliver