REBOL [ Title: "Document Updater" Date: 31-Jan-2006 Name: 'DocUpdate Version: 0.0.1 File: %doc_updater.r Author: "LoO BiCK" Purpose: {Update files from one place to another.} eMail: loobick@loobick.com Web: http://loobick.com/ Note: {I write this script to update MS Word templates on hundreds of computers. In future I can buy SDK or Pro version of Rebol to read paths from registry. And if I can choose in this contest, I prefer Rebol Pro :-D} ] ; set rmt_dir to directory where newest files are ; set loc_dir to directory which contains user files (that which may be overwriten with newest files from rmt_dir) rmt_dir: %/C/test/ loc_dir: %/C/test2/ check: func [new_file] [ rmt: to-string modified? join rmt_dir new_file either exists? join loc_dir new_file [ loc: to-string modified? join loc_dir new_file if greater? rmt loc [write/binary join loc_dir new_file read/binary join rmt_dir new_file] ] [write/binary join loc_dir new_file read/binary join rmt_dir new_file] ] rmt_list: read rmt_dir foreach new_file rmt_list [check new_file]