home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / discutils / _m_z / movefiles / !MoveFiles / !Help < prev    next >
Encoding:
Text File  |  1990-06-27  |  6.7 KB  |  173 lines

  1. MoveFiles, version 0.95, 27 Jun 1990
  2. ====================================
  3.  
  4.  
  5. ***************************  Copyright Notice  **************************
  6. *                                                                       *
  7. *   The object code and documentation for the 'MoveFiles' utility are   *
  8. *   the exclusive copyright of Michael Ben-Gershon and are freely       *
  9. *   distributable, provided this notice is left intact and all of the   *
  10. *   files listed below are included, UNALTERED.                         *
  11. *                                                                       *
  12. *************************************************************************
  13.  
  14.  
  15. Included :-
  16.            ReadMe     (Text)
  17.            MoveFiles  (Module)
  18.  
  19.  
  20.  
  21. Introduction:
  22. =============
  23.  
  24. This utility is designed to 'fix' a couple of major problems with the RISC
  25. OS desktop, until such time as Acorn decide to fix them properly!
  26.     1)  It prevents directories from being copied recursively into
  27.         themselves from the desktop.
  28.  
  29.     2)  It speeds up the copying of large files and directories when
  30.         they are on the same file medium, by using '*Rename' instead
  31.         of '*Copy'
  32.  
  33. When present, it should be largely transparent to the user.  Its memory
  34. requirements are very modest (about 2k, including workspace).
  35.  
  36.  
  37.  
  38. Technical details:
  39. ==================
  40.  
  41. The utility sets up an alias for the 'copy' command, which causes it to
  42. generate a command:
  43.  
  44.            Desktop_NewCopyFiles
  45.  
  46. which takes the same parameters as the original 'copy' command.  This
  47. command is recognised by the MoveFiles module.  When the module is 'killed',
  48. the alias is unset, thus restoring 'normal' operation of the 'copy' command.
  49.  
  50.  
  51. Internal Algorithm:
  52. ===================
  53.  
  54. On entry, we first check the number of parameters.  If there are two, it
  55. cannot be a desktop originated copy command, as the desktop ALWAYS gives
  56. copy options as its third parameter.
  57.  
  58. If there are three parameters, and the copy options given match the ones the
  59. desktop uses for 'file moves' (ignoring the C and V options, which are
  60. variable in the desktop) and both filename strings match up to the first '.'
  61. (meaning that the two files are on the same file medium), and the
  62. destination file does not exist, the copy command is replaced with a rename
  63. command.  Before the rename command is issued, the file's attributes are
  64. read.  If the file was locked, it is unlocked before the rename, then locked
  65. again afterwards.  When locking again after the rename, both the source and
  66. destination files are locked in case the rename was aborted.  Attempting to
  67. set the attributes of nonexistent files does NOT give an error, so this is a
  68. safe strategy to use.
  69.  
  70. If the command was not a desktop originated copy command (or was deemed to
  71. be a desktop 'copy' as opposed to a desktop 'move' by the previous part of
  72. this algorithm) and the 'R' copy-option is currently set (either by the
  73. actual copy command, or the system variable 'Copy$Options'), the filenames
  74. are checked to see if the second is a subdirectory of the first.  This check
  75. is NOT foolproof!  If, for example, the command
  76.  
  77.        *Copy $.scrap scrap.scrap R
  78.  
  79. is issued at the command line, the check will fail, and infinite recursion
  80. will result, as before.  However, the test is really designed for the
  81. desktop, where full filenames are always given.  It simply compares the
  82. second filename with the first - if it is fully contained by the first, and
  83. the first character where it is longer than the first filename is a '.', it
  84. is deemed to be a subdirectory of it.
  85.  
  86.  
  87.  
  88. Correction to PRM:
  89. ==================
  90.  
  91. Please note that OS_ReadVarVal does NOT preserve R0 on exit, even though the
  92. PRM (volume 2, page 750) states that it does!
  93.  
  94.  
  95.  
  96. Versions:
  97. =========
  98.  
  99.   0.90    First released version
  100.  
  101.   0.92    Fixed a bug when more than 3 parameters were given (ie multiple
  102.           copy options separated by spaces followed the second filename when
  103.           used from the command line).  As with the OS version of copy, the
  104.           internal 'Desktop_NewCopyFiles' command now takes from 2 to 255
  105.           parameters.  Bug discovered thanks to Keith Sloan.
  106.  
  107.   0.94    Fixed a bug which tended to ignore all file moves where the
  108.           destination file existed already, even with the 'F' copy option
  109.           set.  Such file moves are now done using a 'copy' operation,
  110.           not a 'rename'.  Rewrote large sections of the code.
  111.  
  112.   0.95    Added a syntax error message to ensure that it behaves in a totally
  113.           transparent manner - as if it were the 'genuine' *copy command.
  114.  
  115.  
  116.  
  117. Conditions of use:
  118. ==================
  119.  
  120. This software is supplied "as is"; no warranty, express or implied, of the
  121. merchantability of this software or its fitness for any particular purpose
  122. is given.  In no circumstances shall the providers of this software be
  123. liable for any damage, loss of profits, or any indirect or consequential
  124. loss arising out of the use of this software or inability to use this
  125. software.
  126.  
  127. You are free to give this application to anyone you please via any medium,
  128. provided it is delivered with ALL the supplied files, UNALTERED.  You may
  129. NOT sell this software, or use it otherwise for personal gain.  If you wish
  130. to post it on your Bulletin Board or include it in your Shareware library
  131. then that, too, is fine.
  132.  
  133.  
  134. You have permission to use any part or the whole application in a project
  135. you intend to place in the public domain, as long as I am fully credited. If
  136. you wish to use these routines in a program that is for sale (for however
  137. much and for whatever reasons) or released as copyright material then my
  138. express permission in writing must be obtained. I maintain copyright on all
  139. the material supplied and reserve the right to amend these conditions in
  140. case where I deem misuse.
  141.  
  142. A large number of hours of work have gone into the production and
  143. maintenance of this application and although I have supplied the application
  144. free, donations will be gratefully received (and if over 7 pounds I will send
  145. you a disc with updates of this and all other pd stuff I have written.
  146. Please include a letter telling me which apps of mine you use and their
  147. version numbers).
  148.  
  149. Please report any bugs you find to me, so that other users may benefit from
  150. improved versions.  I cannot guarantee to fix any bugs, but I will do my
  151. best.
  152.  
  153. My address is:
  154.  
  155. Michael Ben-Gershon
  156. 8 Linnell Drive
  157. LONDON NW11 7LT
  158.  
  159. No telephone calls please.
  160.  
  161. However, I can be contacted as:
  162. Prestel (and SID):    014554781
  163. Janet:                umace03@doc.ic.ac.uk (until September 1990)
  164. Archive BBS:          0603 745932           (mailbox 396)
  165. The World of Cryton:  0749 670030 / 679794  (mailbox 100)
  166.  
  167.  
  168. Thanks are due to Brothers In Arm for giving me the idea of how to implement
  169. the basics of this module.
  170.  
  171.  
  172. © Michael Ben-Gershon 1990 - USE and Enjoy!
  173.