Function DirectoryExists(nombre:unicodestring):Boolean; var Attr:longword; begin Attr:=GetFileAttributesW(PWidechar(nombre)); //INVALID_FILE_ATTRIBUTES if Attr <> $FFFFFFFF then DirectoryExists:= (Attr and FILE_ATTRIBUTE_DIRECTORY) <> 0 else DirectoryExists:=False; end;