[REBOL] Re: truble with " * " all characters recognizing
From: greggirwin:mindspring at: 10-Dec-2002 13:13
Hi Guillaume,
g> I need to open all files in a directory so I tried
g> Foreach file i/exp/ [if file = %*.tab [do somthing]]
g> But rebol dont whant to recognise this form
g> %test.tab is not equal to %*.tab
g> If some of you could describe me the good way to reach my goal ?
This prints all the .r files in the /rebol directory:
Foreach file read %/c/rebol/ [if %.r = suffix? file [print file]]
If you're using an older release, that doesn't have SUFFIX?, here's
the source for it.
>> source suffix?
suffix?: func [
{Return the suffix (ext) of a filename or url, else NONE.}
path [any-string!]
][
if all [
path: find/last path #"."
not find path #"/"
] [to-file path]
]
g> When I open a file out of the rebol file path I enconter security asking is it a way
to remove it ?
You can launch REBOL with the -s command line switch to turn off
security. Type USAGE in the console to see all possible switches.
HTH!
-- Gregg