[Zope] Document Library: Changing Properties

Casey Duncan c.duncan@nlada.org
Thu, 29 Nov 2001 09:08:09 -0500


On Thursday 29 November 2001 02:28 am, Jason C. Leach allegedly wrote:
> hi,
>
> I have 108 documents in a Document Library (product). I need to go through
> them all and set one propertie equal to another. Something like
> document.x = document.y. I figure this is a good time to learn python
> scripting in zope. I don't know how to get the documents into my script,
> then back out.
>
> Any help would be appreciated.
>
> Thanks,
> j.

Actually you can use the Find tab to do this. There you can enter an 
expression. Although is is designed so that and expression can be used to 
find things, it can also be used to execute an expression en masse.

Go to the Documents "Folder", click on the find tab. Click on advanced. In 
the expr field enter something like:

manage_changeProperties(foo=bar)

Where foo is the name of the property to copy to and bar is the one to copy 
from.

hth,
/---------------------------------------------------\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  c.duncan@nlada.org
\---------------------------------------------------/