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

[REBOL] My first contribution in a lonnnng while

From: dwhiting::europa::com at: 1-Mar-2001 13:59

Hi, Attached is a short script that fills a need I had. Related to this, is it a known problem (or _my_ problem) that info? and size? don't function properly for files on the Amiga using Rebol version but does work for directories? HopeThisHelps, Dick -- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# *Dick Whiting* <[dwhiting--europa--com]> _ /Satyre/ on Undernet #AmigaCafe# #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# -- Attached file included as plaintext by Listar -- -- File: bldmirror.r REBOL [ Title: "Mirror a Directory Tree" Author: "Dick Whiting" Date: 01-Mar-2001 Purpose: { I needed a way of identifying what files I had on my Amiga at home while transferring data on a zip disk to/from a PC. The directory tree at home is nearly 1G and the zip is 100M, so ... Create a mirror directory tree with all files having 0 bytes. } Usage: { set the directory paths for master and mirror (with ending slashes) set verbose: true to see processing, false for quiet set test: true to see the processing without actually doing anything mirror directory will be created if necessary, but higher levels should already exist. } ] verbose: true ; set to true to get print of activity test: false ; set to true to not actually create mirror master: %/pics/imagenetion/ ; top level master directory with actual files mirror: %/t/imagenetion/ ; top level mirror directory for 0 byte files if not exists? mirror [ if verbose [print ["DIRECTORY..." mirror]] if not test [make-dir mirror] ] bldmirror: func [treein [file!] treeout [file!] ] [ either dir? treein [ if not exists? treeout [ if verbose [print ["DIRECTORY..." treeout]] if not test [make-dir treeout] ] ain: load treein foreach entry ain [ bldmirror join treein entry join treeout entry ] ] [ if not exists? treeout [ if verbose [print [" file..." treeout]] if not test [write/binary treeout ""] ] ] ] bldmirror master mirror