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