Recursive folder creation
hh
hh at hyperhh.de
Mon Aug 7 16:32:27 EDT 2017
> Bob wrote:
> Wha??? I didn't know this existed. I have a need for that too! I use
> a repeat loop to do this. I suppose that is what this function does as well.
Here is it, for a "direct" call, in case revSBLibrary is not available.
It does the same as Tore's (and probably your) script but is recursive.
# Creates a folder and all parents as required. By Marcus van Houdt.
on revSBEnsureFolder pFolder
set the itemDel to "/"
if there is no folder pFolder and pFolder is not empty then
revSBEnsureFolder item 1 to -2 of pFolder
if the result is not empty then return the result
create folder pFolder
return the result
end if
end revSBEnsureFolder
More information about the use-livecode
mailing list