>
>IF !directory("c:\ProgramData")
> MKDIR "c:\ProgramData"
>ENDIF
>
>
>I receive an error. MKDIR tells me that the directory couldn't be created because there is a sub-directory in it.
>
>Why the directory() function didn't catch it?
My guess is, the directory in question has Hidden or/and System attributes set. I used WSH last time I had to deal with directory like that.
loFso = CREATEOBJECT("Scripting.FileSystemObject")
IF NOT loFso.FolderExists(lcPath)
loFso.CreateFolder(lcPath)
ENDIF
--sb--