Hope this can help
John
FUNCT IsDir( cDirectory AS STRING ) AS LOGIC
LOCAL lRetVal := TRUE AS LOGIC
LOCAL StruData IS _WINWIN32_FIND_DATA
LOCAL nHandle AS PTR
DO CASE
CASE Empty(cDirectory)
lRetVal := FALSE
CASE ! SubStr(cDirectory,2,2) == ':\'
* see if you want full path or not
CASE IsDriveReady(Left(cDirectory,2))
* the drive of the path is not ready
OTHERWISE
lRetVal := FALSE
ENDCASE
*
* check dir on the drive
IF lRetVal
IF !( Right( cDirectory, 1 ) == "\" )
cDirectory += "\"
ENDIF
nHandle := FindFirstFile( String2Psz( cDirectory+'*.*' ), @StruData )
IF nHandle = INVALID_HANDLE_VALUE
lRetVal := FALSE
ELSE
CloseHandle( nHandle )
lRetVal := TRUE
ENDIF
ENDIF
RETURN lRetVal
Op 23-2-2021 om 17:38 schreef aurora baccio: