TREECOPY 1.63 ============= J.G.Harston - mdfs.net TreeCopy will copy files between filing systems, preserving the directory structure, file attributes and creation/modification dates as much as possible. The program is quite easy and self-explanatary to use. It has been written to be fully error-trapped, allow disk swapping, and to read as many files as possible before writing, thereby reducing disk swaps. When asked for filing systems or directory names, you can enter a *command by starting it with a *. When run you are prompted for the source and destination filing systems and directories, and a set of copying options. TreeCopy can also take the following command line parameters, which must be in this order: *TreeCopy (:) (:) ACEFPRSU (-dest) (-quit (*)) An example command line would be: *TreeCopy HADFS::0.$ NET::USER.$.Disk1 ~C~PR -quit &.MenuProg or CHAIN "TreeCopy DISK::0.$ ADFS::0.BACKUP.Disk1 A~C~PS -quit $.MenuProg" The and directories can be prefixed by a filing system selection command terminated with a ':' eg ADFS::0.$ or with Master fileswitch -fsname- prefixes. The single character options control the level of copying: A - Copy all DFS directories (default off) C - Confirm (default off) E - Expand DFS directories (default off) F - Force overwriting (default off) P - Prompt to change disk (default off) R - Recurse (default on) S - Put in subdirs (default on) U - Update (default off) They can be prefixed with '~' to turn off the option, eg ~C means no confirm. If the -dest option is given, TreeCopy will terminate with the destination filing system selected. Otherwise, the source filing system remains selected. The -quit option can give a file to run on exit. If the name starts with a *, then it is called as a *Command, otherwise it is CHAINed. * When 'C'onfirm is selected, you are prompted Yes/No/All to copy each file and directory. If you select 'All', then confirmation is turned off and all further files are copied. * When 'F'orce is selected any locked destination files are unlocked before overwriting them. If 'F'orce is not selected you are prompted 'File locked. Overwrite? Yes/No/All'. If you select 'All', all future locked files are overwritten. * When copying to DFS or DFS-like filing systems filenames are shortened to seven characters. * When copying from DFS or DFS-like filing systems the 'Copy all DFS directories' option allows you to copy the whole disk, creating an approximation of the DFS directory structure by putting all the non-$ directories into subdirectories. * Selecting the 'Put into subdirs' option will copy DFS files into subdirectories for each non-$ DFS directory. Turning this option off will save files in the destination directory prefixed with "x/", where x is the DFS directory. For example, the DFS file "B.Prog" becomes "B/Prog". * When copying to DFS or DFS-like filing systems selecting the 'Expand into DFS directories' option will copy files with a "x/" prefix into the DFS directory "x". For example, the file "B/Prog" becomes the DFS file "B.Prog". * When 'U'pdate is selected, files will only be copied if there is no destination file or the load, exec and lengths are different. This has to check the source and dest for each file, so if the 'P'rompt option is selected this will result in a lot of disk swapping. Creation and modification metadata is recognised on Acorn File Server, SJ MDFS File Server and HADFS. If copying to a filing system with less metadata then the unsupported metadata will be lost. If copying to a filing system with more metadata then the creation and modification dates are set the same. When running LoBASIC on the 6502 CoPro, TreeCopy will relocate itself to maximise available memory. Occasionally, TreeCopy will just stop when reading the source file information on a large file from a file server. If this happens, using the -debug option usually works. For instance CHAIN "TreeCopy -debug etc". If copying between an ADFS disk in one drive and a non-ADFS disk in another drive, the ADFS disk should be mounted first, otherwise ADFS tries to mount the non-ADFS disk. Examples -------- TreeCopy DISK::0 ADFS::1.$.DFSFiles will copy the files in the $ directory on the DFS disk in drive 0 into the directory $.DFSFiles on the ADFS disk in drive 1. TreeCopy ADFS::1.$.DiskBack DISK::0 will do the opposite action, copying all the files in the directory $.DiskBack on the ADFS disk in drive 1 into the $ directory of the DFS disk in drive 0. TreeCopy DISK::0 ADFS::0.$.DiskBack AP will copy all the files on the DFS disk in drive 0 into the directory $.DiskBack on the ADFS disk also in drive 0, prompting to swap disks when neccesary. Files in the DFS $ directory will be copied to DiskBack, files in other DFS directories will be copied to DiskBack.X where X is the DFS directory. The (A)ll option can be thought of as a DFS (R)ecurse option. TreeCopy ADFS::0.$.DiskBack DISK::0 RP will do the opposite action, copying all the files in the directory $.DiskBack on the ADFS disk in drive 0 onto the DFS disk also in drive 0, prompting to swap disks when neccesary. The copy will (R)ecurse into subdirectories of $.DiskBack and copy the files into the same DFS directories. If the ADFS directory contains subdirectories that cannot be copied to a DFS disk (for example, longer than one character or multiple levels of subdirectories) you will get 'Bad filename' errors. TreeCopy ADFS::0.$.Source.Project1 ADFS::0.$.Test will copy all the files in the directory $.Source.Project1 on the ADFS disk in drive 0 and all the files in its subdirectories into the directory $.Test on the same disk. TreeCopy ADFS::0.$.Source.Project1 ADFS::0.$.Test P will copy all the files in the directory $.Source.Project1 on the ADFS disk in drive 0 and all the files in its subdirectories into the directory $.Test on another disk in drive 0, with the P option prompting to swap disks as necessary.