Lo all,

I was just wondering if there are any quick ways to make a directory hiracy?

Say, I have the following example:

if (!(-X
"/usr/local/www/v-webs/$ClientCode/$WebList[1]/$WebList[2]/htdocs")) {
  // Directory doesn't exist.
}

What will be the most effective way to make this directory?  I think I'll
need to -X every directory individually to see if it exist, and make it if
they don't exist.. Such as:

if (!(-X "/usr/local/www/v-webs/$ClientCode)) {
  mkdir("/usr/local/www/v-webs/$ClientCode", 0777);
}
.... Next dir

But this is going to be a hell of allot of code to do manually surely...
Especially when directory structures becomes even longer...  Is there a
quick way of doing it?  I'm thinking of perhaps splitting the directory into
a array and walking through the elements of the array, but I'm not to
certain on how to do this...

Anyone with some code to share? ;-)

--
me



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to