Problem while creatding directory

Hi All, I want to create directory in AIX environment by using Lotus Script, i can use mkdir command, the problem is the directory is dynamic, if i use midir /tmp/somu/lotus the directory is not created, but if i go one by one like first i craete mkdir /tmp chmod 777 tmp,mkdir /tmp/somu, chmod 777 tmp/somu , mkdir /tmp/somu/lotus, chmod 777 /tmp/somu/lotus it is working fine.

localpath = “/tmp/somu/lotus”

this command will solve my problem

mkdir -m 777 -p " + localpath

but i don’t know how to write it in lotus script.if i write it it is giving error, i used the following script

pearl2 = Freefile()

Open pearl2 For Output As #2

Write #2, "mkdir -m 777 -p " + localpath

Close #2

i = Shell(pearl2)

If i = 32 Then

Kill pearl2

Print “Folder Successfully created”

End If

pls advice me.

regds

soma

Subject: Problem while creatding directory

write a script to parse thru the string at every and extract the characters between 2 /s, then use that to create and switch to new directory.

Loop thru the string till you reach the end of it.