home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / mcp108.zip / MCP.DOC < prev    next >
Text File  |  1993-02-08  |  21KB  |  539 lines

  1. MCP.DOC -- documentation for MCP.EXE
  2.  
  3.  
  4. WHAT IS THIS?
  5.  
  6. MCP (Master Copy) is kind of like XCOPY, but it normally only
  7. overwrites older files and it can move files.  It was written
  8. primarily for use in keeping directory structures shared by
  9. different people (or by the same person on different computers)
  10. in synchronization with each other.  It is also a quick way to
  11. implement disk mirroring style backups.
  12.  
  13.  
  14. HOW DO I RUN MCP?
  15.  
  16. Syntax:
  17. MCP.EXE source [destination] [switches]
  18.   /A = copy only files with Archive bit set (leave source archive
  19.        bit set)
  20.   /B = ask permission Before overwriting each existing
  21.        destination file.
  22.   /C = copy & overwrite all files except those with identical
  23.        date, time & size
  24.   /D = copy files with date the same or later than Date given
  25.        /D:mm-dd-yyyy /D:dd.mm.yyyy /Dmm/dd/yy or /Ddd.mm.yy
  26.   /F = Force overwrite of system, hidden, and read only files
  27.   /H = Copy system and hidden files as well.
  28.   /J = Just copy files that already exist in destination
  29.        directory.
  30.   /L = Verbose output
  31.   /M = copy only files with archive bit set (Modify source
  32.        archive bit)
  33.   /N = No overwrite
  34.   /O = Overwrite destination files
  35.   /P = Prompt before copy
  36.   /Q = Quiet (report only errors)
  37.   /R = Rename or move files
  38.   /S = /E = recurse through Subdirectories (& create empty ones)
  39.   /T = Stop Twirling "propeller" (useful for redirection)
  40.   /U = Update (overwrite only older files -- the default mode)
  41.   /V = This switch doesn't cause an error message, but it doesn't
  42.        do anything. It is included so that batch files written
  43.        for XCOPY can use MCP with the same switches.  (/V turns
  44.        verify on in XCOPY).
  45.   /W = Wait for keystroke before starting copy
  46.   /? = Show help screen.
  47.  
  48. On the command line, source is a file name or directory name,
  49. which may optionally include drive and path.  It may also include
  50. DOS wild cards ? and *.  If the source is a drive or directory,
  51. the file specification *.* is assumed.
  52.  
  53. The destination is a file name or directory.  If no destination
  54. is specified, the current directory is assumed.  If there are
  55. wild card characters in the destination file name, they will be
  56. filled in with the corresponding characters in the source file
  57. name.  If it is not obvious if the destination is a file or
  58. directory, you may be asked which you meant.  To ensure that the
  59. destination is interpreted as a directory instead of a file, end
  60. the directory name in "\" or ensure that the destination
  61. directory already exists.  If the destination directory does not
  62. exist, it will be created.
  63.  
  64. Switches all start with "/" (not "-", since - is a valid file
  65. name character in DOS), and may be before, between, and/or after
  66. the source and destination.  Switches may be combined.  In case
  67. of a conflict between switches, the one that is farthest to the
  68. right on the command line takes precedence.  For brevity, command
  69. line switches may be run together after a single "/".  Switches
  70. are not case sensitive.
  71.  
  72. /A (Archive) and /M (Modify archive) both specify that only files
  73. that have the DOS directory archive bit set (indicating that they
  74. have been changed since they were last backed up) should be
  75. copied.  /A does not alter the archive bit on the source file. 
  76. /M clears the archive bit of the source file to indicate that it
  77. has been backed up.  The archive bit of the destination file is
  78. always set when using MCP.  These options can be used for backing
  79. up data when the largest file you want to back up will fit on
  80. your destination media.  If the largest file you want to back up
  81. is bigger, a regular backup program is more appropriate than MCP.
  82.  However, for some small but important files, backing up with a
  83. copy command like MCP makes more sense, because the file itself
  84. is not altered, making restoration possible even without the
  85. original backup program.
  86.  
  87. For example, 
  88.  
  89. MCP /A C:\WORK\DOC\*.* A:
  90.  
  91. copies all files in C:\WORK\DOC to the floppy disk in A: that
  92. have not been marked as backed up.
  93.  
  94. /B (ask Before overwrite) causes MCP to stop and ask if you want
  95. to copy each file for which the destination file already exists.
  96.  
  97. /C (Copy & overwrite all but identical date, time & size) will
  98. cause all destination files with the same name but different
  99. (older or newer) date & time or different size (smaller or
  100. larger) to be overwritten.
  101.  
  102. /D (Date) is always followed by a date, with no space in between
  103. the /D and the date.  The colon following the D is optional.  The
  104. order of the date is month day year if you use "/" or "-" to
  105. separate the numbers in the date.  If you use "." to separate the
  106. numbers in the date, the order is day month year.  The year can
  107. be specified with either the last two digits or all four digits. 
  108. If you specify the last two digits, the year is assumed to be in
  109. the range 1980 through 2079.  The month must be expressed as a
  110. number between 1 and 12.  Leading zeros on month and day are
  111. optional.
  112.  
  113. For example, the following commands all copy everything with a
  114. file date on or after December 25, 1991 from the current
  115. directory to D:\SAVE\.
  116.  
  117. MCP /D12/25/91 *.* D:\SAVE\
  118. MCP /D:12/25/91 *.* D:\SAVE\
  119. MCP *.* D:\SAVE\ /D12/25/1991
  120. MCP /D12-25-91 *.* D:\SAVE\
  121. MCP *.* /D12-25-1991 D:\SAVE\
  122. MCP /D25.12.91 *.* D:\SAVE\
  123. MCP /D:25.12.1991 *.* D:\SAVE\
  124.  
  125. /F (Force) forces overwriting of Hidden, System, and Read Only
  126. files.  WARNING:  use this option with caution.  It is very
  127. useful for some situations, but could have some undesired side
  128. effects if you overwrite some files of this type.
  129.  
  130. /H (Hidden & system) allows files with the system and hidden
  131. attribute to be copied.  Note that the XCOPY that comes with DOS
  132. 5 will not copy hidden files, but earlier versions will.  The
  133. system and hidden attributes will be applied to the destination
  134. files when they are present in the source files.  Note:  copying
  135. the two hidden system files from a boot drive to another drive
  136. will not necessarily make the destination bootable.  Use the DOS
  137. SYS command for that purpose.
  138.  
  139. /J (Just existing) causes only those files that already exist in
  140. the destination directory to be copied over (and then only if
  141. they are older, the /o switch is used, or the /b switch is used
  142. and you answer Y for yes).
  143.  
  144.  
  145. /L (Loud) causes extra screen output to be generated, including
  146. the names of all files that are skipped.
  147.  
  148. /N (No overwrite) prevents any destination files from being
  149. overwritten, regardless of the file dates and attributes
  150. involved.  The default is to allow overwrites of destination
  151. files with an earlier file date.  This is the opposite of /O
  152. (Overwrite always).
  153.  
  154. /O (Overwrite always) causes destination files to be overwritten
  155. regardless of its file date.  The default is to allow overwrites
  156. only of destination files with an earlier file date.  This is the
  157. opposite of /N (No overwrite).
  158.  
  159. /P (Prompt) asks you if you want to copy each file with a Y/n
  160. prompt.  "N" or "n" will cause the file to be skipped.  Most
  161. other keys, including "Y" and "y" will cause the file to be
  162. copied.  The "Enter" key need not be pressed after the "y" or
  163. "n".
  164.  
  165. For example,
  166. MCP /P *.* A:
  167. lets you pick exactly which files you want to copy to drive A:,
  168. one by one.
  169.  
  170. /Q (Quiet) suppresses all screen output except for error messages
  171. and the help screen in response to a command line error or /?.
  172.  
  173. For example,
  174. MCP /Q /M C:\WORK\*.* F:\MASTER\FRED\
  175. in a network login script would be a subtle way to back up some
  176. critical directory on a users's hard disk to a network directory,
  177. where it could be moved to tape or something.
  178.  
  179. /R (Rename or move) causes files to be renamed if the source and
  180. destination are on the same disk, or copied then the original
  181. deleted (after a successful copy) if the source and destination
  182. are on different disks.  If the copy fails, the original is left
  183. intact.  When used with the /S option, emptied subdirectories are
  184. not removed.
  185.  
  186. For example,
  187. MCP C:\STUFF\*.DOC D:\OLDJUNK\ /R
  188. moves every .DOC file in C:\STUFF\ to D:\OLDJUNK\.
  189.  
  190. /S or /E (Subdirectory copy) copies files and subdirectories from
  191. the destination to the source, making subdirectories as needed. 
  192. Empty subdirectories are created as well.  Using /S and/or /E on
  193. the command line of MCP is the same as using both /S and /E on
  194. the command line of XCOPY.
  195.  
  196. /U (Update) overrides a previous /o, /b, or /n on the command
  197. line and returns MCP to its default handling of existing
  198. destination files (overwrite them only if they are older).
  199.  
  200. /V does nothing.
  201.  
  202. /W (Wait) causes the prompt "Press a key when ready to start copy
  203. . . ." to be displayed, and the program to pause until you hit a
  204. key before starting the copy process.  This is for use with
  205. floppy only systems, where the MCP command may reside on a disk
  206. other than the one you want do do the copy on.
  207.  
  208. /? (Help) shows the help screen.
  209.  
  210.  
  211. ZERO LENGTH FILES
  212.  
  213. Unlike XCOPY, MCP copies zero length files and, if copying
  214. subdirectories, always copies empty subdirectories.  It also
  215. duplicates the file attributes (system, hidden, read only) of the
  216. source file in the destination file, except for the archive bit,
  217. which is always set in the destination file.
  218.  
  219. PROMPTS
  220.  
  221. There are several prompts possible in MCP.  At each of the
  222. prompts, the default answer (if applicable) is indicated with a
  223. capital letter.  Answers to the prompts are not case sensitive,
  224. and are all only one keystroke.  Pressing "Enter" after a letter
  225. is not required.  The "Enter" key is ignored at all prompts
  226. except for the "Press a key when ready to start copy . . ."
  227. prompt caused by the /W option.  In addition to the listed
  228. responses at any prompt, "Esc", "Ctrl-C", and "Ctrl-Break" will
  229. terminate MCP.  "Ctrl-Break" will also terminate a copy in
  230. progress, even if the program is not looking for an answer to a
  231. question.
  232.  
  233. filename Y/n?
  234.  
  235. This is the format used in asking if you want to copy a
  236. particular file when you put /P on the command line.  "N" means
  237. that you do not want to copy the file, and most other keys
  238. (including "Y") mean that you do want to copy the file.
  239.  
  240.  
  241. Only 512 bytes available on A:.  filename requires 1234 bytes.
  242. Retry with new disk, Try new disk later, Skip, or Cancel
  243. (r/T/s/c)?
  244.  
  245. If your destination is on a fixed disk, press "S" to skip just
  246. this file or "C" to cancel and exit MCP.  If your destination is
  247. a removable disk, you may skip the current file or cancel as with
  248. a fixed disk destination.  You may also wish to change disks and
  249. then press "R" to retry copying the current file, or press "T" to
  250. try copying the next file (which may fit) and add the current
  251. file to a list to be tried again later (on a different floppy
  252. disk).  Most other keys act the same as "T".
  253.  
  254.  
  255. No more room on drive A:
  256. Retry with new disk, Skip or Cancel (R/s/c)?
  257.  
  258. Your destination disk has no more room on it.  Change the disk
  259. and press "R" to retry, or "C" to exit the MCP program.
  260.  
  261.  
  262. Error writing to filename.
  263. Retry, Skip, or Cancel (r/S/c)?
  264.  
  265. MCP encountered one of many possible errors (insufficient network
  266. rights, bad disk sectors, hardware failures, disk full even
  267. though it had enough room to start the copy, etc.).  "R" restarts
  268. the copy from the beginning of the file.  "S" skips this file and
  269. tries the next.  "C" cancels the copy and exits MCP.
  270.  
  271. Does destination specify a File name
  272. or Directory on the target (f=File, D=Directory)? 
  273.  
  274. The destination directory is not an existing directory and the
  275. name does not end with "\", and there may be more than one source
  276. file (indicated by wild cards in the name or a /S or /E switch). 
  277. Press "F" if you intended that the destination is a file name, or
  278. "D" if you intended that the destination is a directory.  If you
  279. decide that the command line was in error, press "Esc".
  280.  
  281.  
  282. Press a key when ready to start copy . . .
  283.  
  284. You used the /W option.  Press "Esc", "Ctrl-C", or "Ctrl-Break"
  285. if you decide you really didn't want to copy anything after all,
  286. or press any other key to start the copy process.
  287.  
  288.  
  289. ERROR MESSAGES
  290.  
  291. Break!
  292.  
  293. You pressed Ctrl-Break, Ctrl-C, or Esc to halt the program.
  294.  
  295.  
  296. Unable to create filename
  297.  
  298. The destination file name may have been on an invalid drive, have
  299. contained invalid characters, been in the root directory with all
  300. directory entries filled, been on a network directory with
  301. insufficient rights, been too long for DOS or the network
  302. operating system to create, or some other similar problem.
  303.  
  304.  
  305. Files may not be copied onto themselves.
  306.  
  307. The first step in copying a file is to create a new file of zero
  308. length with name of the destination file.  If the source and
  309. destination files are the same, this action would destroy the
  310. source file.
  311.  
  312.  
  313. Destination path is too long.
  314.  
  315. The most likely cause of this error message is starting a
  316. recursive copy command (like MCP /S C:\*.* C:\SUBDIR\).  This
  317. causes everything in the root directory of drive C: to be copied
  318. to C:\SUBDIR\ and C:\SUBDIR\SUBDIR\ and C:\SUBDIR\SUBDIR\SUBDIR\
  319. and so on.  Older versions of XCOPY allow this, the latest one
  320. does not.  MCP allows the recursion to go on until the resulting
  321. path name exceeds DOS limits.  This is a great way to fill up a
  322. hard disk in a hurry.
  323.  
  324.  
  325. Not enough memory to run MCP.EXE
  326.  
  327. Try reducing the number of TSR programs, or if you are shelled
  328. out to DOS from another program, exit that other program.
  329.  
  330. Access denied.
  331.  
  332. DOS (or some network software) returned an error code indicating
  333. that the operation was not allowed.  Some things that can do this
  334. is trying to create a directory when a file with the same name
  335. already exists or trying to write to a network directory where
  336. you have insufficient rights.
  337.  
  338.  
  339. Bad file number.
  340.  
  341. Something strange is going on that confused DOS and/or MCP --
  342. probably some error associated with a multitasking environment.
  343.  
  344. Attempt to copy more than one file to file.
  345.  
  346. MCP does not concatenate files (use DOS COPY to do that), so
  347. copying more than one file to a single file means that all that
  348. ends up in the destination file is the last file copied.  If this
  349. were done with the /R option, all but the last file would be
  350. destroyed.  Therefore, only one file is allowed to be copied to a
  351. file.  The trap that catches this is not foolproof (although it
  352. is reasonably difficult to fool), so you should still take care
  353. on the command line to avoid specifying such an action.
  354.  
  355.  
  356. Unable to open filename
  357.  
  358. The specified file name may not be valid, or may be on a network
  359. directory where you have insufficient rights.
  360.  
  361.  
  362. Ran out of memory keeping track of files to retry.
  363.  
  364. Each file name source and destination that is "remembered" to try
  365. later when you run out of room copying to a diskette takes up
  366. some conventional RAM.  After several thousand of these (more or
  367. less, depending on how much RAM you have available), you may run
  368. out.
  369.  
  370.  
  371. ERRORLEVEL
  372.  
  373. When running MCP in a batch file, you can test for the following
  374. values of ERRORLEVEL after MCP runs:
  375.  
  376. 0 = Normal completion.
  377. 2 = "Ctrl-Break", "Ctrl-C", or "Esc" pressed, or copy canceled
  378.     with "C".
  379. 3 = Unable to write to destination file.
  380. 4 = Attempted to copy file onto itself.
  381. 5 = Destination path is too long.
  382. 6 = Not enough memory to run.
  383. 7 = Access denied.
  384. 8 = Bad file number error returned by DOS.
  385. 9 = Attempt to copy more than one file to one destination file.
  386. 11 = Command line error or help requested.
  387. 12 = Unable to open input file.
  388. 13 = Ran out of memory keeping track of files to retry.
  389.  
  390. A COPY PROGRAM BY ANY OTHER NAME
  391.  
  392. MCP comes from M as in Master or Mike's and CP as in the name for
  393. the Unix copy command.  Call it whatever you like, by renaming
  394. it, creating an alias with DOSKEY or a similar utility, or by
  395. creating a batch file.  You might want to create a batch bile
  396. called MOVE.BAT (or MV.BAT) that contains the line:
  397.  
  398. MCP /R %1 %2 %3 %4 %5 %6 %7 %8 %9
  399.  
  400.  
  401. LIMITATIONS
  402.  
  403. MCP does not do concatenation.  It does not get the date format
  404. from the DOS country table.  It does not do Japanese dates in
  405. year-month-day format.  All of its error messages are in English.
  406. It does not do a full screen interface.  It doesn't skip zero
  407. length files just because they are zero length.  It doesn't skip
  408. creation of empty subdirectories when /S is used. /V does
  409. absolutely nothing.  It doesn't remove any subdirectories, nor
  410. does it preserve subdirectory attributes (like the hidden bit)
  411. when copying subdirectories.  It doesn't predict winning lottery
  412. numbers.  On the other hand, it does do some things that I always
  413. thought that XCOPY should have done. 
  414.  
  415.  
  416. COPYRIGHT NOTICE & DISCLAIMER
  417.  
  418. Copyright (C) 1992-1993 Michael Paul Johnson.  All rights
  419. reserved.  No warranty. All trademarks mentioned herein belong to
  420. their respective owners.  This is shareware.  To register, please
  421. send $15.00 (or $25.00 if you also want original disks & printed
  422. documentation; $100 for site license for unlimited use within one
  423. corporation) to:
  424.  
  425.     Mike Johnson
  426.     PO BOX 1151
  427.     LONGMONT CO 80502-1151
  428.     USA
  429.  
  430. Registration entitles you to support on the Rainbow Missions BBS
  431. (303-938-9654) and by mail, and to notification of major upgrades
  432. at discount rates.  Minor upgrades (like 1.04 to 1.05) are free
  433. for the downloading from the Rainbow Missions BBS, or available
  434. to registered users on disk for $10.
  435.  
  436. Although I try to write perfect software, there is a chance that
  437. I goofed up in some way.  If you find this to be the case, please
  438. let me know so that I can repair it.  Because I can't test every
  439. possible use of this software on every system that it might be
  440. run on, and because I have no control over the way shareware gets
  441. passed around, you use this software entirely at your own risk. 
  442. Prices are subject to change without notice.
  443.  
  444. HOW TO CONTACT THE AUTHOR
  445.  
  446. 1.  Leave a message at the Rainbow Missions BBS, 303-938-9654. 
  447.     The latest version of this software will be posted there, as
  448.     well.
  449.  
  450. 2.  Write to Mike Johnson, PO Box 1151, Longmont CO 80502-1151,
  451.     USA.
  452.  
  453. 3.  Send electronic mail to CompuServe ID 71331,2332 or Internet
  454.     address mikej@exabyte.com.
  455.  
  456. 4.  Call Mike Johnson at home at 303-772-1773, Saturdays only.
  457.  
  458.  
  459. HISTORY
  460.  
  461. 1.00  5 Sep 92  Initial release.
  462.  
  463. 1.01  7 Sep 92  Modified to allow recursive copies of hidden
  464.                 subdirectories.
  465.  
  466. 1.02  9 Sep 92  Corrected handling of . and .. as source or
  467.                 destination directory name.
  468.  
  469. 1.03 20 Sep 92  Added /C switch to specify overwrites of all but
  470.                 identical files.
  471.  
  472. 1.04 22 Sep 92  Added /B switch to allow individual prompts for
  473.                 overwrites.
  474.  
  475. 1.05  5 Oct 92  Improved safety feature that prevents copying or
  476.                 renaming more than one file to the same
  477.                 destination file. Added /J switch to allow
  478.                 selective copying only of files that already
  479.                 exist in the destination directory.
  480.  
  481. 1.06 11 Dec 92  Added /T switch for better results with
  482.                 redirected output.
  483.  
  484. 1.07 14 Dec 92  Corrected command line scanning error that
  485.                 sometimes caused /D switch to be falsely
  486.                 rejected.
  487.  
  488. 1.08  6 Feb 93  Increased depth of recursion possible for better
  489.                 network compatibility.
  490.  
  491.  
  492.                               INVOICE
  493.  
  494. Remit to:                                 From:
  495.  
  496. Mike Johnson                              ______________________
  497.  
  498. PO Box 1151                               ______________________
  499.  
  500. Longmont CO 80502-1151                    ______________________
  501.  
  502.                                           ______________________
  503.  
  504.  
  505.                       Contact person:
  506.  
  507.                       ______________________
  508.  
  509.                       ______________________
  510.  
  511.  
  512. Quantity  Description                       Unit Price    Total
  513.  
  514.           MCP registration with disk
  515. ________  & printed documentation.           $25.00       ______
  516.  
  517.  
  518.           MCP single copy registration
  519. ________  only.                              $15.00       ______
  520.  
  521.  
  522.           Site license for unlimited use
  523.       of MCP at one corporation
  524.       (includes one disk & printed
  525. ________  documentation).                   $100.00       ______
  526.  
  527.  
  528.  
  529.                                               Total       ______
  530.  
  531.  
  532.  
  533. I prefer 5.25"____   3.5"____  disks.
  534.  
  535. Note that the MCP software has been delivered and accepted by
  536. the customer.  Upon reciept of this paid invoice, the printed
  537. documentation and disks paid for will be sent.
  538.  
  539.