home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Workbench / Patches / CopyReplace.lha / CopyReplace.doc < prev    next >
Text File  |  1998-05-08  |  10KB  |  274 lines

  1. Advantages of this Copy:
  2.   - can be called like original Copy - complete replacement
  3.   - replaces programs Copy, MakeLink, Delete, Rename, MakeDir (and Move)
  4.   - has option to delete source-file (MOVE)
  5.   - can rename the files instead of moving (when on same device)
  6.   - can produce hardlinks and softlinks
  7.   - has 3 different grades of beeing quiet
  8.   - able to copy protection bits, comments, dates
  9.   - processes directories recursive
  10.   - may turn off overwrite mode
  11.   - may force overwriting (unprotect destination)
  12.   - may force deletion (unprotect source)
  13.   - produces destination directories recursiv! (Not only the last one)
  14.  
  15. Copy needs OS 37 (2.0) or later OS versions!
  16. Of course this Copy is reentrant (pure bit) like the original one.
  17.  
  18. **************************************************************************
  19.  
  20. USAGE:
  21.   FROM/M,TO,PAT=PATTERN/K,BUF=BUFFER/K/N,ALL/S,DIRECT/S,CLONE/S,DATES/S,
  22.   NOPRO/S,COM=COMMENT/S,QUIET/S,SILENT/S,NOREQ/S,ERRWARN/S,MAKEDIR/S,
  23.   MOVE/S,DELETE/S,HARD=HARDLINK/S,SOFT=SOFTLINK/S,FOLNK=FORCELINK/S,
  24.   FODEL=FORCEDELETE/S,FOOVR=FORCEOVERWRITE/S,DONTOVR=DONTOVERWRITE/S,
  25.   FORCE/S:
  26.  
  27.   FROM     multiple input files
  28.   TO       destination file or directory
  29.   PATTERN  a pattern the filenames must match
  30.   BUFFER   buffersize for copy buffer (default 200 [100K])
  31.   ALL      deep scan into sub directories
  32.   DIRECT   copy mode only: copy file without any tests or options
  33.   CLONE    copy comment, protection bits and date as well
  34.   DATES    copy dates
  35.   NOPRO    do not copy protection bits
  36.   COMMENT  copy filecomment
  37.   QUIET    suppress all output and requesters
  38.   SILENT   suppress output, but not errors and requesters
  39.   NOREQ    suppress requesters
  40.   ERRWARN  do not proceed, when one file failed
  41.   MAKEDIR  produce directories
  42.   MOVE     delete source files after copying successful
  43.   DELETE   do not copy, but delete the source files
  44.   HARDLINK make a hardlink to source instead of copying
  45.   SOFTLINK make a softlink to source instead of copying
  46.   FOLNK    also makes links to directories
  47.   FODEL    delete protected files also
  48.   FOOVR    also overwrite protected files
  49.   DONTOVR  do never overwrite destination
  50.   FORCE    DO NOT USE. Call compatibility only.
  51.  
  52. **************************************************************************
  53.  
  54. FROM:
  55. Source file(s). For directories, all contained files are source files. May
  56. have standard AmigaDOS patterns.
  57.  
  58. TO:
  59. Destination file or for multiple sources destination directory. Destination
  60. directories are created (including all needed parent directories).
  61.  
  62. PAT=PATTERN:
  63. PATTERN allows to specify a standard dos pattern, all file have to match.
  64. This is useful with ALL option.
  65.  
  66. Example:
  67.  When you want to delete all .info files in a directory tree, you need
  68.  this option: Copy DELETE #? ALL PAT #?.info
  69.  
  70. BUF=BUFFER:
  71. Specify the number of 512 byte buffers for copying. Default are 200 buffers
  72. [100KB memory]. One buffer is minimum size, but should never be used.
  73.  
  74. ALL:
  75. Scan directories recursively
  76.  
  77. DIRECT:
  78. Certain devices do not allow some of the used DOS packet request types.
  79. This option is a really easy copy command, which only opens source and
  80. destination directly without any tests and checks.
  81. Options ALL, PAT, CLONE, DATES, NOPRO, COM, MAKEDIR, MOVE, DELETE, HARD,
  82. SOFT, FOLNK, FODEL, FOOVR, DONTOVR and multiple input files cannot be
  83. specified together with DIRECT. This options needs one input and one output
  84. file.
  85. When you want to delete a softlink, which does no longer point to a valid
  86. file, you need this option as well.
  87. Example use: 'Copy DIRECT text PRT:' to print a file called text.
  88. - Copy manages a lot of such cases automatically, but maybe this option is
  89. needed sometimes.
  90.  
  91. CLONE:
  92. The filecomment, date and protection bits of the source files are copied to
  93. destination file or directory.
  94.  
  95. DATES:
  96. The date information of source is copied to destination.
  97.  
  98. NOPRO:
  99. The protection bits of sources are NOT copied. So the destination gets
  100. default bits [rwed].
  101.  
  102. COM=COMMENT:
  103. The filecomment is copied to destination.
  104.  
  105. QUIET:
  106. Copy is completely silent here. Really no output is given, also no requests
  107. for missing disks or other problems!
  108.  
  109. SILENT:
  110. Copy is silent. Only error messages and requests are printed.
  111.  
  112. NOREQ:
  113. No standard DOS requests are displayed, when an error occurs.
  114.  
  115. ERRWARN:
  116. Copy knows and returns the 3 types of dos.library errors:
  117.    5    WARN    The processing of one file failed, Copy skips this file
  118.            and proceeds the next.
  119.   10    ERROR    The creation of a directory or any other bad error happend.
  120.           Copy quits after that.
  121.   20    FAIL    A really hard error happend (No memory, Examine failed, ...)
  122.         Copy quits after that.
  123. When option ERRWARN is used, the result 5 (WARN) gets result 10 (ERROR). So
  124. Copy aborts everytime an error occured.
  125.  
  126. MAKEDIR:
  127. All names specified in FROM field are taken as directories, which must be
  128. created.
  129.  
  130. MOVE:
  131. The files are not copied, but moved (or renamed). This means that after
  132. move operation the source does no longer exist.
  133.  
  134. DELETE:
  135. This does not copy anything, but delete the source files!
  136.  
  137. HARD=HARDLINK:
  138. Instead of copying the files, a hard link is created. This only works,
  139. when destination is on same device as source.
  140. When ALL option is specified, the directories are scanned recursively, else
  141. Copy produces links to the directories.
  142.  
  143. SOFT=SOFTLINK:
  144. Instead of copying directories, a soft link is created. These links are
  145. useable between different devices also. Soft links are only created for
  146. directories. Files are skipped here. Option FORCELINK is therefor always
  147. set to true.
  148. NOTE: Softlinks are not official supported by OS and may be dangerous.
  149. I suggest not to use this option! See description below.
  150.  
  151. FOLNK=FORCELINK:
  152. When linking of directories should be possible, this option is needed. See
  153. section "About links" for possible problems.
  154.  
  155. FODEL=FORCEDELETE:
  156. When this option is enabled, files are deleted also, when they are delete
  157. protected.
  158.  
  159. FOOVR=FORCEOVERWRITE:
  160. When this option is enabled, files are overwritten also, when they are
  161. protected.
  162.  
  163. DONTOVR=DONTOVERWRITE:
  164. This option prevents overwriting of destination files.
  165.  
  166. **************************************************************************
  167.  
  168. Some comments on how the program does it's job:
  169.  
  170. The program has 6 working modes: COPY, MOVE, SOFTLINK, HARDLINK, DELETE and
  171. MAKEDIR. Only one of these can be used at same time!
  172.  
  173. Move option renames the files, when on same device, else the file is copied
  174. and the source deleted after that.
  175. When a directory is processed and on the same device it is renamed! This
  176. means MOVE option copies complete directories also without ALL option (when
  177. on same device).
  178.  
  179. In Copy mode you may use f.e. "Copy C: RAM:K" instead of "Copy C:#? RAM:K".
  180. For the other modes this does not work!
  181.  
  182. Destination files are always overwritten, except DONTOVERWRITE is turned
  183. on, or they are protected.
  184.  
  185. When the destination directory does not exists, it is created. Existing
  186. files with same name are overwritten. When some parent directories do not
  187. exist, they are also created. This is also done, when only one file is
  188. copied.
  189.  
  190. The program does a loop detection, so that copying/moving/linking with a
  191. sub directory of source as destination and ALL option is not possible.
  192. Example: Copy RAM:S RAM:S/C ALL
  193.  
  194. **************************************************************************
  195.  
  196. Useful aliases you may add to S:User-StartUp:
  197.  
  198. Alias Delete   Copy [] DELETE
  199. Alias MakeDir  Copy [] MAKEDIR SILENT
  200. Alias MakeLink Copy TO [] HARDLINK SILENT
  201. Alias Move     Copy [] MOVE CLONE
  202. Alias Rename   Copy [] MOVE CLONE SILENT
  203.  
  204. Some programs do want the files to be in C: directory. For these you may
  205. additionally use following lines:
  206.  
  207. Alias C:Delete   Copy [] DELETE
  208. Alias C:MakeDir  Copy [] MAKEDIR SILENT
  209. Alias C:MakeLink Copy TO [] HARDLINK SILENT
  210. Alias C:Rename   Copy [] MOVE CLONE SILENT
  211.  
  212. **************************************************************************
  213.  
  214. About links:
  215.  
  216. HARDLINKS:
  217. When copying one file to annother place on same disk, the file afterwards
  218. uses double space. Links are a method to resolve that problem. When using
  219. a link, the file is not copied, but only a new entry to the same data as
  220. created. This saves space and allows to have copies of files always
  221. up-to-date (as when on link is updated, all the others are new as well).
  222.  
  223. SOFTLINKS:
  224. This is a link method, which is NOT official supported by the OS. Soft links
  225. do not need to be on the same partition. The may be used for references
  226. between different partitions.
  227. NOTE: Using this links may cause lots of problems. You may test for yourself
  228. if it works for you!
  229.  
  230. PROBLEMS:
  231. Links to directories may cause infinite directory loops!
  232.  
  233. Example: Having following directory tree:
  234.  
  235.                  DEV:
  236.                 /    \    
  237.                A      B
  238.  
  239. Some loops are detected, for example when trying to do:
  240.   MakeLink DEV:A/C DEV:A FORCE
  241. Here you get an error message, that loops are not allowed.
  242.  
  243. Some more complicated links cannot be detected:
  244.   MakeLink DEV:A/C DEV:B FORCE
  245. and
  246.   MakeLink DEV:B/C DEV:A FORCE
  247. Till now no error message is possible, so the result is an infinite loop.
  248.  
  249. **************************************************************************
  250.  
  251. This program is Freeware. Use it as you want, but WITHOUT ANY WARRANTY!
  252. Although you get program and complete sources, this program is still
  253. copyrighted by me. No changes should be done to it or it's distribution
  254. archive contents.
  255.  
  256. When you use this program more than once, you have to contact the author
  257. via e-mail or snail-mail!
  258.  
  259. Please report me bugs, comments, suggestions and problems. If there are
  260. some Enforcer hits or other problems report them as good as possible.
  261.  
  262. Please contact me:
  263.  
  264. ****************************************************************************
  265. * snail-mail:                  * e-mail:                                   *
  266. *   Dirk Stoecker              *   stoecker@rcs.urz.tu-dresden.de          *
  267. *   Geschwister-Scholl-Str. 10 *   stoecker@amigaworld.com                 *
  268. *   01877 Bischofswerda        * world wide web:                           *
  269. *   GERMANY                    *   http://gremlin.home.pages.de/           *
  270. * phone:                       * pgp key:                                  *
  271. *   GERMANY +49 (0)3594/706666 *   get with finger or from WWW pages       *
  272. ****************************************************************************
  273.  
  274.