[Zope] How to count files in a folder?
Mike Renfro
renfro@tntech.edu
Tue, 18 Sep 2001 09:54:21 -0500
On Tue, Sep 18, 2001 at 09:42:57AM +0200, Jan Lentfer wrote:
> 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?
See the DTML User's Guide, Table 2 (discusses the len() method) and
search the Zope Help for "objectIds", but I think the following
untested code would work:
This folder contains <dtml-var "_.len(objectIds('Image'))"> pictures.
--
Mike Renfro / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu