dir() in linux

new topic     » topic index » view thread      » older message » newer message

-- start of code

  x = dir("*.REQ")    --  Get all *.REQ filenames in the current directory.
  if atom(x) then
      return(0)            --  no filenames
  end if
  
  -- end of code

  This works perfectly on Windows.  But not on Linux.  On Linux dir("*.REQ")  
always returns -1 even tho the current directory contains *.REQ files.
  
  I checked with current_dir() to find out what it thinks the current 
directory is.  No problem with current directory.  And the *.REQ files are 
there.  But dir("*.REQ") doesn't find them.

  It's not a case problem.  All the filenames use upper case ".REQ" and the 
code uses upper case "*.REQ".

    The Euphoria manual, under "dir", says:
 "On Windows and DOS st can contain * and ? wildcards to select multiple 
files."

  Does this mean dir() can't use wildcards on Linux?

  The command "ls" understands *.REQ.  When I type "ls *.REQ" it works.
If ls understands * why not dir()?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu