>Hmmmmm...thanks to all of you for the feedback.
>
>So, a DirectoryIsEmpty() function would be something like this:
>
>LPARAMETERS tcDir
>RETURN ADIR(laTemp, tcDir, "D") < IIF(OCCURS("\", tcDir) = 1, 1, 3)
>
>where tcDir ends in "\*.*"
>
>Is there a more elegant construct or dedicated function available?
>
>-mark
>
>=======================
Something like
function DirectoryIsEmpty(tcDir)
local aa[1] , n
n = adir(aa, addbs(m.tcDir) + '*.*', 'DHS')
return empty(m.n) or ((m.n == 2) and (aa[1,1]=='.') and (aa[2,1] == '..') )
Gregory