1 LISP LIBRARY PACKAGES MANUAL 1 LISP LIBRARY PACKAGES MANUAL COPYFILES 1 FILE UTILITIES 1 COPYFILES 6 2 Introduction 1 This package makes it easy to copy or move groups of files from one place to another. (COPYFILES SOURCE DESTINATION OPTIONS) [Function] Copies the files designated by SOURCE to the place designated by DESTINATION. SOURCE is a pattern such as given to DIRECTORY or DIR; it can also be a list of file names. DESTINATION is either a directory name, or a file-name pattern, with a one-to-one match of ©©*''s in DESTINATION to ©©*''s in SOURCE. (The number of *'s in each source pattern needs to match the number of *'s in each destination pattern.) The argument OPTIONS is a (list of) options (if you have only one and it's an atom, you can supply it as an atom), as follows: 1. You can specify how verbose CopyFiles is about what it is doing: QUIET Don't print anything while working. (OUTPUT LISTFILE) Print the name of each file that gets copied on LISTFILE. (OUTPUT T) is the default. TERSE Only print a ©©.'' for each file moved/copied. 2. You can specify whether CopyFiles should ask before each transfer. Default is not to ask. ASK Ask each time before moving/copying a file (default is to not ask). (ASK N) Ask, with default to No after DWIMWAIT seconds. (ASK Y) Ask, with default to Yes after DWIMWAIT seconds. 3. CopyFiles normally uses COPYFILE to create a new file. It also usually only copies the ©©highest version,'' and creates a new version at the destination. Alternatively, you can specify any of the following: RENAME or MOVE Use RENAMEFILE instead of COPYFILE, i.e., the source is deleted afterwards. ALLVERSIONS Copy all versions, and preserve version numbers. REPLACE If a file by the same name exists on the destination, overwrite it (don't create a new version). 4. After CopyFiles gets done, it can be instructed to delete some files afterward: PURGE This involves a separate pass (afterwards): any file on the destination which doesn't have a counterpart on the source is deleted. PURGESOURCE Converse of PURGE (and used by it): if the file is on the source and not on the destination, delete it. CopyFiles normally compares the creation dates of the file on the source and any matching file on the destination to determine whether it is necessary to copy. The following options are mutually exclusive: ALWAYS Always copy the file. > Copy only when a file by the same name but an earlier creation date exists on the destination. >A Similar to >, but also copy if the file doesn't exist on the destination, i.e., > ALWAYS. # Copy only when a file by the same name but a different creation date exists on the destination. #A Similar to #, but also copy if the file doesn't exist on the destination, i.e., # ALWAYS. =A Copy only if there isn't a file of the same name on the destination. Not all combinations of options make sense; for example, ALLVERSIONS probably doesn't work right with any date comparison algorithms. The default setting is (>A), that is, copy highest version if it either doesn't exist on the destination or only an older creation date exists, and to print out messages about all files considered. 2 Examples 1 (COPYFILES '{ERIS}*.MAIL '{PHYLUM}OLD-*.MAIL) will copy any mail file on {Eris} to {Phylum}, renaming FOO.MAIL to OLD-FOO.MAIL. (COPYFILES '{ERIS}*.MAIL '{PHYLUM}OLD-*.MAIL 'RENAME) will use RENAMEFILE instead. (COPYFILES '({DSK}TEST {DSK}WEST) '{PHYLUM}) will move the files TEST and WEST from {DSK} to {PHYLUM}. (COPYFILES '{PHYLUM}*.AR '{PHYLEX:}ARS> '=A) will copy all of the ARs on {PHYLUM} to the Phylex NS file server; if any are already there, it won't bother copying them. (COPYFILES '{PHYLUM}AR.INDEX '{DSK}AR.INDEX '(>A REPLACE)) will copy the AR index to {DSK}, replacing any older version that is already there. COPYFILES({DSK}*.; {FLOPPY}) will copy all files on {DSK} with no extension to {FLOPPY}. (COPYFILES '{ERIS} '{PHYLUM} '(#A PURGE)) will make {Phylum} look like {ERIS}; bringing over any file that isn't already on Phylum and then deleting the ones that were on {PHYLUM} and aren't on {ERIS} any more. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC ) STARTINGPAGE# 129) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (270 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE NIL FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (-234 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE NIL FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (270 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))1ÌÌø,ø1ÌÌø ,ø2ø2,øT2ø,øT1ÌÌø,ø1ÌÌø,ø1Ì,ø,ø.ÌÌø ø.ÌÌøøBøø PAGEHEADING VERSOHEADBøø PAGEHEADING RECTOHEADAøø PAGEHEADINGFOOTINGVAøø PAGEHEADINGFOOTINGR(È MODERNMODERN MODERNMODERN  HELVETICA  HELVETICA   HRULE.GETFNMODERN    HRULE.GETFNMODERN     HRULE.GETFN HELVETICA    HRULE.GETFNMODERN     HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERNV  V Y xkD*25F089Ò[=iS‰tÎa]b]H†Ç HRULE.GETFNMODERN  HRULE.GETFNMODERNBfJ4B<„DT<B¾§˜zº