michael nt milne wrote:
> Cheers, thanks a lot for that. I'll give it a go. I still may be
> interested
> in sponsoring a version with the improvements you mention etc and possibly
> more. Would that code be compatible for Unix and also for Windows NTFS?

Note: I think this deals with Files, as per Zope's built-in OFS types, not
ATFile, the 'File' type you see in Plone. It may still work, but you may
also need to access ATFile's API directly.

Note that another version of this script may be to just use wget to pull the
URLs for files. For example, you could have a script:

from Products.CMFCore.utils import getToolByName
catalog = getToolByName(context, 'portal_catalog')
for i in catalog(portal_type = ('File', 'ATFile',)):
    print i.getURL()
return printed

... put that in a skin folder or portal_skins custom. Then write a bash
shell script or similar that first does a wget to
http://my.server.com/getAllFileUrls (if that's the name of the script),
saving the body of the response (a newline-delimited list of filenames) to a
file or just an array in-memory (you could do this with python's urllib as
well). Then, loop over the lines in that file, and do a get on each one - it
should fetch the file for you.

View this message in context: 
Sent from the Zope - General forum at Nabble.com.

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to