[Zope] renaming large list of objects

Evan Simpson evan@digicool.com
Mon, 14 Feb 2000 21:02:55 -0600


----- Original Message -----
From: alan runyan <runyaga@myrealbox.com>
> all 'Files' needing to be renamed to original_id + '.abc'
>
> <dtml-in "PARENTS[0].objectValues(['File'])">
>    <dtml-call "REQUEST.set('new_name', _.string.join(_
> ['id'], '.abc') )">
>   <dtml-call "manage_renameObject(id, new_name ,REQUEST)">
> </dtml-in>

_.string.join is used to concatenate lists of strings, and the optional
second argument is inserted between each pair of strings, so
_.string.join('fred', 'aahz') is 'faahzraahzeaahzd' ('fred' is a list of
four characters).

You're better off with:

<dtml-call "manage_renameObject(id, id + '.abc', REQUEST)">

Cheers,

Evan @ digicool