Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: check me? deleting files based on a pattern

From: antonr:iinet:au at: 28-Oct-2003 23:22

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? Anton.