Dir() problem....
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Jan 02, 1999
- 468 views
Patrick wrote: >Hy, >(Happy new year.) Happy new year too, to all Euphorians! >I have a problem with dir() (from file.e) . >If I want the index of files for example : >dir("*.exe") >It returns a sequence when there are files. >It returns -1 when there is no file with .exe . >So if I check for -1 at the return it works when >I have no files with .exe. >But if there is a file with .exe . >It gives an error message for the line I >check for -1. >Can someone help me ?? >Bye, >PQ >QC >(quistnet at yahoo.com) ---- example: object Directory -- an object can hold an atom OR a sequence Directory =3D dir("*.exe") if atom(Directory) then -- no sequence, so no exe files found puts("Nothing found") else -- there is a sequence -- rest of your routine end if ---- end example ---- Ad Rienks kwibus at dolfijn.nl