On 18 Mar 2005 at 22:43, David Pratt wrote:
Hi. I am creating a product on the filesystem. Outside of the skins that contain generic scripts and templates, I am organizing a series of folders and their contents in the same hierarchy that I to want it appear in my CMF site. Some of these folders are two or three levels deep. Can someone suggest a method to recursively read the folders and files from the product and move them to the site during install (or alternatively point me to an existing product install script that demonstrates this).
First off, why develop your files on the file system? Why not develop them in Zope and then publish them by exporting a .zexp file? If you must move files back and forth between the file system and Zope, then you could use FTP. Most decent FTP clients will allow a recursive up/download. Lastly, if you must use the file system and you need an installer instead of a manual process, then look into Python's ftplib module. It won't do the work for you, but it's a pretty easy module to use. Gre7g