[Zope-CMF] Python: trying to copy files

Ryan P. de Vega rpd4972@hbu.edu
Thu, 25 Jul 2002 08:51:21 -0500


Is 'targetfolder' something I would need to define?  If so, I think this
is where I have been having my problem all along.  What do I define as the
targetfolder if for example I want to paste the objects into a folder in
the ZMI called /CMF/TEST ?  This helps, but I'm not quite there yet?

Thanks!
Ryan

schubbe@web.de writes:
>Did you try this?
>
>tmpObj = context.manage_copyObjects(REQUEST['ids'])
>context.portal_url.getPortalObject().targetfolder.manage_pasteObjects(tmpObj)
>
>Yuppie

>Ryan P. de Vega wrote:
>> ---Goal---
>> When someone clicks on a portal button (something like 'copy' in
>> folder_contents), selected (selected via checkboxes so far) objects are
>> copied and pasted into another folder in the ZMI - but not the within
>the
>> 'Members' folder.
>> 
>> ---Progress---
>> I can get the selected objects to copy into the logged-on member's
>folder
>> (within the ZMI 'Members' folder), but not into a specified folder in my
>> "CMF Test Site" ZMI or CMF root.
>> 
>> ---Problem---
>> I can't figure out how to put files into a Zope folder from the CMF -
>> using python.  Any ideas on what the syntax would be for this task? 
>> Anything would help - I'm dead in the water.
>