Hi,
> Oops, it occurs to me that I forgot to add the tail refinement to my first
> find (meaning a file feeder~fodder.r~ would be missed for example). This
> should work better:
>
> has-backup-file?: func [
> {Returns true if any item in block ends with r~}
> arg [block!]
> ][
> forall arg [
> if (result: find/tail first arg "r~") [
> if (length? result) = 2 [
> return true
> ]
> ]
> ]
> return false
> ]
>
> Later,
>
> Stephen
>
You could also use the empty? function if you wanted
has-backup-file?: func [
{Returns true if any item in block ends with r~}
arg [block!]
/local result
][
forall arg [
if all [
result: find/last/tail first arg "r~"
empty? result
][
return true
]
]
false
]
Julian Kinraid