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

[REBOL] Re: Recursive directory read/delete

From: cyphre:volny:cz at: 20-Apr-2001 15:39

Hello Andrew, Here is my old function. Maybe you'll find it somehow usefull... copy-dir: func [ copies/moves the whole dir structure src [file!] "source directory" dst [file!] "destination directory" /move "just moves the whole dir structure" ][ if not exists? dst [make-dir/deep dst] foreach file read src [ src-path: rejoin [src file] dst-path: rejoin [dst file] either dir? src-path [ copy-dir src-path dst-path if move [ delete src-path ] ][ write/binary dst-path read/binary src-path if move [ delete src-path ] ] ] if move [delete src] return true ] Regards, Cyphre