Find Directory?
[1/5] from: webmaster:siliconspecies at: 6-Sep-2000 17:06
I am writing some code which takes user input in a form and then checks to
see if the user input is a directory name or not.
Now on Win98 in Rebol console, it works fine.
Each directory is %directory/
yet in linux I can't make it work
filename: %filename
directory: read blahblahblah ;read the directory into a block
found: find directory filename
that doesn't work
always comes up with "none"
help me please
thanks,
Jeff Rubin, CTO & Co-Founder
Audiopia
Shutup and Listen...
http://www.audiopia.com
also check out my personal site Brainbyte!
http://www.brainbyte.com
[2/5] from: ryanc:iesco-dms at: 6-Sep-2000 15:44
I suspect:
found: find directory filename
should be:
found: find directory to-file filename
[webmaster--SILICONSPECIES--COM] wrote:
> I am writing some code which takes user input in a form and then checks to
> see if the user input is a directory name or not.
<<quoted lines omitted: 14>>
> also check out my personal site Brainbyte!
> http://www.brainbyte.com
--
* Ryan Cole *
Programmer Analyst
www.iesco-dms.com
707-468-5400
;Fortuneately escape will cancel this endless loop...
Forever [ buy microsoft version: version + 1 ]
[3/5] from: webmaster:siliconspecies at: 6-Sep-2000 18:29
that did the trick duh again...
At 03:44 PM 9/6/00 -0700, you wrote:
>I suspect:
>found: find directory filename
<<quoted lines omitted: 34>>
>;Fortuneately escape will cancel this endless loop...
>Forever [ buy microsoft version: version + 1 ]
Jeff Rubin, CTO & Co-Founder
Audiopia
Shutup and Listen...
http://www.audiopia.com
also check out my personal site Brainbyte!
http://www.brainbyte.com
[4/5] from: ryanc::iesco-dms::com at: 6-Sep-2000 16:51
Gee, there is no wonder why my stuff dont run the first time... What you shown
actually works, the to-file as I indicated is useless, since you already specified
the filename as a file. Anyways here is my scribbles for code that demonstrates
your doing the right thing:
rebol []
forever [
filename: to-file ask "file: "
directory: read %./ ;read the directory into a block
found: find directory filename
if found [ print rejoin ["Found: " first found ] ]
]
Your bug is unlisted, try running a trace on it.
--Ryan
Fishing baskets are employed to catch fish;
but when the fish are got, the men forget
the baskets; snares are employed to catch
hares; but when the hares are got, the men
forget the snares. Words are employed
to convey ideas; but when the ideas are
grasped, men forget the words.
--Chuang Tzu
[webmaster--SILICONSPECIES--COM] wrote:
> that did the trick duh again...
> At 03:44 PM 9/6/00 -0700, you wrote:
<<quoted lines omitted: 51>>
> also check out my personal site Brainbyte!
> http://www.brainbyte.com
--
* Ryan Cole *
Programmer Analyst
www.iesco-dms.com
707-468-5400
;Fortuneately escape will cancel this endless loop...
Forever [ buy microsoft version: version + 1 ]
[5/5] from: agem:crosswinds at: 7-Sep-2000 5:07
to check if a %filename is a directory use
>> dir? %mails
== true
>> dir? %mails/
== true
>> dir? %nox ;non-existent
== false
>> dir? %nox/
== false
what is blablabla? it has to end with "/", then it works.
there is
>> dirize %filename
== %filename/
to help.
volker
[webmaster--SILICONSPECIES--COM] wrote on 6-Sep-2000/17:06:55-5:00
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted







