Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: dir?

From: anton:lexicon at: 30-Jun-2002 22:07

Hi Charles, dir? only works in the current directory. If you look at the source of dir?, you will see that. Do this: ?? dir? Then do this: info? target where target is a file that is not in the current directory. It returns none, so your test always fails because none is not true. You should use the absolute path. foreach file read dir: join root sub [ if (dir? dir/:file) ... You can probably also use clean-path in other situations to get the absolute path. Anton.