Posted By

reboltutorial on 03/02/10


Tagged

backup


Versions (?)

Copy Dir


 / Published in: Bash
 

URL: http://www.rebol.net/cookbook/recipes/0011.html

  1. copy-dir: func [source dest] [
  2. if not exists? dest [make-dir/deep dest]
  3. foreach file read source [
  4. either find file "/" [
  5. copy-dir source/:file dest/:file
  6. ][
  7. print file
  8. write/binary dest/:file read/binary source/:file
  9. ]
  10. ]
  11. ]

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: reboltutorial on March 2, 2010

Now you can write:

copy-dir %pages/ %archive/

You need to login to post a comment.