[REBOL] Re: check me? deleting files based on a pattern
From: notofo:earthlink at: 28-Oct-2003 9:02
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 file read base [
> if find file "editpost" [
> if error? set/any 'err try [delete base/:file][
> print mold disarm err
>You can, by the way, say this:
> home: %~/
> base: join home %attempt-it/
>How many files?
the task is finished, I "risked it." I'll use your suggestions. I
especially like the error checking.
I've been a reboler for years and I'm still *very* clueless.
you brushed up against a question I've had for a while. How can I
elimintate most of the "rejoins" that I use?
I rejoin everything. If all you have is a hammer...