RebOldes' code below is not as fast as possible yet, I think,
though less likely to write a bug by missing or adding
an extra [ next dir-port ], and it is less code to
maintain, still...
If you look at source delete, it is opening
a directory port to do its work.
Better to use remove on a direct
Hello Tom,
Tuesday, October 28, 2003, 3:02:40 PM, you wrote:
TF> Anton Rolls wrote:
>>Looks pretty safe to me.
>>You are just in one directory.
>>This will delete all files with "editpost"
>>in the name somewhere.
>>I would catch errors while deleting the file
>>so you are not interrupted by a
Hi Tom,
TF> How can I elimintate most of the "rejoins" that I use?
TF> I rejoin everything. If all you have is a hammer...
JOIN and REJOIN will return the same datatype as the first item you
give them, so you can avoid doing a lot of TO-* stuff if you don't use
strings for everything (and look
Hi, Tom,
Saving some typing and evaluation...
Tom Foster wrote:
>
> home: to-file rejoin ["~" "/"]
>
> base: to-file rejoin [home "attempt-it/"]
>
> foreach file read base [
> if found? (find file "editpost") [
> delete base/:file
> ]
> ]
>
You can just use a literal FILE! v
Anton Rolls wrote:
>Looks pretty safe to me.
>You are just in one directory.
>This will delete all files with "editpost"
>in the name somewhere.
>I would catch errors while deleting the file
>so you are not interrupted by a single
>"file access error" because one file is in use.
>
> foreach
Looks pretty safe to me.
You are just in one directory.
This will delete all files with "editpost"
in the name somewhere.
I would catch errors while deleting the file
so you are not interrupted by a single
"file access error" because one file is in use.
foreach file read base [