for k in sentFiles.keys():
#context.manage_addFile(k, sentFiles[k])
context.directory.subdirectory.manage_addFile(k,sentFiles[k])
NOTE: if your directories have punctuation you may have to
'progrmatically traverse' to the folder. see getatttr() recipe.
i.e.
sub-folder/sub.subfolder would be:
destination=getattr(context,'sub-folder')
destination=getattr(context,'sub.subfolder')
destination.manage_addFile(k, sentFiles[k])
or try this:
destination=context.restrictedTraverse('sub-folder/sub.subfolder')
destination.manage_addFile(k, sentFiles[k])
#Should this be made into a seperate recipe? Traversing the ZODB?
|