Hi Donald,
perhaps I'm misunderstanding something. But ...
>#1
>files: READ %. gets the current directory, but how do we do it with a
>set-word? Example:
>
> directory: %/partition/drawer/drawer
> files: READ %directory(how to deal with "."?)
>
>doesn't work because (among a few things) it tries to read the current
>directory. I don't want to use CHANGE-DIR because then REBOL persists to look
>at that drawer, which is *very* annoying when trying to re-run the program.
It appears to me that you are trying to read the directory located at
%/partition/drawer/drawer ?
Under windows I can read the directory saying:
files: read /drive/folder/folder/
such as in
>> directory: %/d/temp/
== %/d/temp/
>> files: read directory
== [%save_NewFrames/ %funky/ %tcl-v7/ %snapshots/ %lynx_w32_2_8_2 ...
>
>#2
>"files" (above) will, eventually, be a block of about 300 file names. I need
>to know how to take five file names at a time and make a string that is:
>"name+name+name+name+name", to add to a URL.
One possibility would be:
>> files: [%a %b %c %d %e %f %g %h %i %j]
>> foreach [f-1 f-2 f-3 f-4 f-5] files [
print mold to string!
reduce [f-1 "+" f-2 "+" f-3 "+" f-4 "+" f-5] ]
which results in:
"a+b+c+d+e"
"f+g+h+i+j"
Hope this helps,
;- Elan >> [: - )]