<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
John,<br>
<br>
Seems like external scripts and dictionaries are a theme today.&nbsp; You
need to check python manuals for file handling.&nbsp; Its a simple
implementation.&nbsp; Then you would parse out names and title and put them
in a dictionary and return.<br>
<br>
then in replace range(1...10) as seen in earlier messages with
something *like*<br>
<br>
for n in yourDictionary:&nbsp; <br>
&nbsp;container.manage_addFolder(id = n, title = yourDictionary[n])<br>
<br>
David<br>
<br>
<br>
<br>
John Poltorak wrote:
<blockquote cite="mid20050623233426.A55@warpix.org" type="cite">
  <pre wrap="">Thanks David,

That works fine although it is a little crude. What I'd like to be able to 
do is create folders with names and titles derived from an external File 
where each line contains the name and title, separated by a comma.

Guess I need to find out how to get python to read lines from a Zope File 
object....

On Wed, Jun 22, 2005 at 10:49:07AM -0700, David H wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">John Poltorak wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Is there any way to create folders in batch?

I need to create around 50 but don't fancy doing this manually.


 

      </pre>
    </blockquote>
    <pre wrap="">John,

Put this in a python script and test.

for n in range(10):
   container.manage_addFolder(id= str(n))

David

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
</body>
</html>