Re: Dir() problem....
- Posted by Irv Mullins <irv at ELLIJAY.COM> Jan 02, 1999
- 486 views
On Fri, 1 Jan 1999 16:19:51 PST, Patrick Quist <quistnet at HOTMAIL.COM> wrote: >Hy, > >(Happy new year.) > >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 . object d -- gotta be an object, which can hold either sequence or atom (-1) d = dir("C:\\MTDIR") if atom(d) then puts(1,"Directory is empty") else do_something_else() end if Irv