>>>< SNIP >
>>>
>>>>Mark,
>>>>As Sergey said you'd change your checks to something like IsDir(lcPath).
>>>>I meant asm was exception, if you don't need special folders that adir() can't access than go with adir(). ie (w/o error checking):
>>>>
>>>>
function IsDir
>>>>lparameters tcPath
>>>>private lnFiles
>>>>lnFiles = adir(arrDummy,tcPath+'\*.*','D')
>>>>return lnFiles > 0 and arrDummy[1,1]='.' and 'D'$arrDummy[1,5]
>>>>Cetin
>>>
>>>It would return incorrect result if directory is empty. Here's working version
PARAMETER cDirectory
>>>PRIVATE aDir
>>>cDirectory = ALLTRIM(cDirectory)
>>>IF RIGHT(cDirectory,1) = "\"
>>> cDirectory = LEFT(cDirectory, LEN(cDirectory)
>>>ENDIF
>>>RETURN ADIR(aDir, cDirectory, "D") > 0
>>>
>>
>>Sergey,
>>Nope. Unless it's a root directory it can't be empty.
>>
>>md c:\emptydir
>>
>>? adir(arrDir,'c:\emptydir\*.*','D')
>>? arrDir[1,1], 'Attribs :'+arrDir[1,5]
>>
>>
Cetin
>
>Yep, with network drive it can be. Your function returned .F. for empty directory on the network drive (Novell).
Oh in Novell :) In Novell you can even show a drive as a dir too. I don't have Novell any more :) so I can't test. If I were going to use with Novell I would implement a Novell bin for e3 calls.
Cetin