home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Complet / FreeDOS / fdbootcd.iso / FREEDOS / PACKAGES / BASE / DISK02 / DSKCOPYX.ZIP / HELP / diskcopy.en
Text File  |  2003-05-28  |  20KB  |  603 lines

  1.                                === Diskcopy ===
  2.  
  3. Version.
  4. --------
  5.  
  6. This is the documentation for FreeDOS diskcopy beta 0.92. This version is
  7. a candidate for version 1 and contains all the planned features for
  8. diskcopy. These include:
  9.  
  10. - disk copies for any disk using FAT12 with a disk size which is a multiple of
  11.   16Kb for example 160 Kb, 180 Kb, 320 Kb, 360 Kb, 720 Kb, 1.44 Mb and 2.88Mb
  12.   disks.
  13. - use of XMS, EMS, swap files and main memory for disk copies.
  14. - full verification of reads and writes
  15. - image file support (full as well as small image files).
  16. - mouse button support.
  17. - rawrite compatibility.
  18. - disk error recovery mode.
  19. - ini file support for easier configuration.
  20. - ini cache file support for fastest configuration file reads.
  21. - fast diskcopy (only copy sectors that are realy filled).
  22. - multi language support.
  23. - long file name support.
  24. - update of serial number.
  25. - diskcopy can be compiled using only freely available software. 
  26. - guaranteed to run in FreeDOS (DOS-C)
  27.  
  28. New in this version.
  29. --------------------
  30.  
  31. Fixed a bug that made diskcopy crash when using it on a ram disk.
  32.  
  33. Authors.
  34. --------
  35.  
  36. Mathew Stanford (original version).
  37.  
  38. Imre Leber (imre.leber@worldonline.be).
  39.  
  40. License.
  41. --------
  42. Diskcopy is distributed under the terms of the GNU General Public License
  43. (see COPYING for details).
  44.  
  45. The XMS and EMS public domain routines by Cliff Rhodes have been translated 
  46. to nasm by Imre Leber and the assembly versions have been put under the 
  47. GNU General Public License by Imre Leber.
  48.  
  49. The file drvtypes.asm is a nasm translation of a pascal source file. Since
  50. this file has been given to me by Ralph Quint this file remains under the 
  51. public domain.
  52.  
  53. The two libraries used are cats and io95. Cats is written by Jim Hall 
  54. (jhall@freedos.org) and io95 is written by Steffen Kaiser 
  55. (Steffen.Kaiser@fh-rhein-seig.de). Both libraries are released under
  56. the GNU LGPL.
  57.  
  58. Multilanguage support was first added by Wladimir y Jimenez B, the german 
  59. translation was done by Achim Sondermann and Nagy Daniel.
  60.  
  61. The original version of free diskcopy has been written by Matthew Stanford,
  62. who personally asked me to work on it further.
  63.  
  64. Purpose.
  65. --------
  66. Diskcopy is a free implementation of the MS-DOS utility with the same name.
  67. It currently supports disk copies for almost any diskette type including
  68. 160 Kb, 180 Kb, 320 Kb, 360 Kb, 720 Kb, 1.2 MB, 1.44 MB and 2.88 MB disks,
  69. using XMS, EMS, buffers or swap file. On top of that diskcopy supports the
  70. use of image files.
  71.  
  72. Syntax and usage.
  73. -----------------
  74. The syntax for diskcopy is as follows:
  75.  
  76. Diskcopy <source><destination>[/a][/v][/m][/i][/o][/1][/x][/d][/r][/f][/?]
  77.  
  78. The parameters are to be interpreted as:
  79.  
  80. source:      drive or image file to copy from.
  81. destination: drive or image file to copy to.
  82.  
  83. /a : give an audible warning for user action.
  84.  
  85.      This option gives a beep each time user action is required.
  86.  
  87. /v : verify reads and writes.
  88.  
  89.      With this option enabled reads and writes are verified. Notice that
  90.      using this option takes twice as long as without it. The DOS verify 
  91.      flag is not influenced by this option.
  92.  
  93. /m : only use memory for disk copy.
  94.  
  95.      With this option only memory is used for the diskcopy, meaning either
  96.      XMS, EMS or buffers.
  97.  
  98. /i : show memory usage (informative).
  99.  
  100.      Tells you which kind of memory is used.
  101.  
  102. /o : overwrite destination, if it already exists (in case of an image file).
  103.  
  104.      When you want to make an image file of a floppy disk and a file with
  105.      that name already exists the program refuses to overwrite the file.
  106.      With this option you can change this behaviour and force an overwrite
  107.      of existing files.
  108.  
  109. /x : always automatically exit.
  110.  
  111.      This switch makes sure the program always exit. You will most likely
  112.      notice this at the end of the program. If you use this switch the 
  113.      program will no longer ask you wether you want another copy of the disk
  114.      or wether you want another copy of the disk.
  115.  
  116. /d : assume disk already in drive.
  117.  
  118.      This switch is used to speed up disk copying. The program will not
  119.      ask you to insert the source or destination diskette if possible.
  120.  
  121. /r : go into error recovery mode.
  122.  
  123.      Sometimes part of a disk is unreadable, but everything else is still
  124.      valid. In those cases you might want to copy the disk to a new disk,
  125.      while recovering as much data as possible. Using this switch you can 
  126.      force diskcopy to scan more effectively for media errors on the disk 
  127.      and recover more of the disk than is possible without the switch.
  128.      
  129.      This option is not available, if you compile diskcopy to always be
  130.      in error recovery mode (see also further).
  131.  
  132. /f : perform fast diskcopy (only copy filled sectors).
  133.  
  134.      using this option only the sectors which are filled are copied resulting
  135.      in a much faster way of making a disk copy. Notice however that the
  136.      copy of the target disk in this case is not exactly the same as that of
  137.      the original. All files on the disk will however be identical to those
  138.      on the original disk.
  139.  
  140.      This option is also used to make small image files. These image files
  141.      will then contain only the information of sectors which contain data. 
  142.      If you write the image file back to a disk the disk will not be identical
  143.      to the first disk, but all files will be the same.
  144.  
  145. /t : don't ask target disk if copying image file to same disk.
  146.  
  147.      When copying an image file to the same disk as the one that is being 
  148.      copied, the program normally asks to insert a new disk. When using
  149.      this option the image file is directly written to the disk without 
  150.      asking for an other disk.
  151.  
  152. /1 : this option doesn't do anything but has been included for MS-DOS
  153.      compatibility.
  154.  
  155. /? : displays the help screen.
  156.  
  157. The character for the options (the '/') actually depends on the DOS switch
  158. character. If you have changed it to an other character than '/', you can 
  159. use that character instead (but this is not required).
  160.  
  161. Because there is now support for a configuration file, options set in the
  162. configuration file can be cleared by using a minus sign (-) after the option.
  163.  
  164. compile time options.
  165. ---------------------
  166.  
  167. There are two compile time options that can be chosen to select different
  168. ways in which diskcopy works. The options can be set in the makefile for
  169. the source by changing the comments of the following four lines:
  170.  
  171. #hlpoptions =             
  172. hlpoptions = -DDEF_HELP
  173.  
  174. recoptions = 
  175. #recoptions = -DALL_RECOVERY_MODE
  176.  
  177. These two lines contain defines that can be turned on or off, the meaning
  178. is as follows:
  179.  
  180. hlpotions = [-DDEF_HELP]
  181.  
  182.         This define changes the behaviour of diskcopy when there are no 
  183.         parameters. The default is to show the help on the screen. By
  184.         changing the define you can get the more MS-DOS like message
  185.  
  186.                 Invalid drive specification or non removable media.
  187.  
  188.         which was used in earlier versions of diskcopy.
  189.  
  190. recoptions = [-DALL_RECOVERY_MODE]
  191.  
  192.         This define changes the way recovery mode is selected. Normally 
  193.         recovery mode is only selected when the user uses the /r switch.
  194.         When using this define diskcopy is always in recovery mode and
  195.         the /r switch is no longer valid and results in a warning.
  196.  
  197. Image files.
  198. ------------
  199.  
  200. Image files are files that contain the contents of a floppy disk in raw 
  201. format. These files can contain all the data of the disk or only the 
  202. information needed to rebuild the files of the original disk.
  203.  
  204. The main advatage of image files is that one can save the contents of a
  205. floppy on a different medium, like a CD-ROM or a hard disk and recreate 
  206. the disk only when you need it.
  207.  
  208. Image files also make it possible to distribute image files through the
  209. internet.
  210.  
  211. To make an image file the following command can be used:
  212.  
  213.      diskcopy a: example.img
  214.  
  215. To rewrite the contents to a different floppy disk you can do the following:
  216.  
  217.      diskcopy example.img a:
  218.  
  219. For reasons of closure it is allso possible to copy image files with 
  220. diskcopy, as follows:
  221.  
  222.      diskcopy example1.img example2.img
  223.  
  224. but this is (almost) the same as copy example1.img example2.img.
  225.  
  226. As said there are two kinds of image files. The first kind being a full
  227. representation of the disk. This kind is the default and is generated when:
  228. - the .ini file doesn't contain the option "SPEED = FULL", or
  229. - the /f option is not used and/or the /f- option is used
  230.  
  231. The second kind only copies the relevant parts of the disk resulting in a 
  232. potentially much smaller image file. This image file is generated when:
  233. - the .ini file contains the option "SPEED = FULL", or
  234. - the option /f is used and/or the /f- option is not used.
  235.  
  236. Examples:
  237.  
  238.     Generate a full image file:
  239.         
  240.         No option "SPEED = FULL" in ini file:
  241.                 diskcopy a: example1.img 
  242.         
  243.         Making sure that a full image file is generated:
  244.                 diskcopy a: example1.img /f-
  245.     
  246.     Generate a small image file:
  247.  
  248.         Option "SPEED = FULL" used in ini file:
  249.                 diskcopy a: example1.img 
  250.         
  251.         Making sure that a small image file is generated:
  252.                 diskcopy a: example1.img /f
  253.  
  254. The /f option (or the SPEED= option in the .ini file) makes no difference
  255. when copying the image file back to a disk. Diskcopy can find out by itself
  256. what kind of image file is used.
  257.  
  258. When writing an image file to the same disk as the one which is copied,
  259. it is assumed that a small image file needed to be created. This is
  260. because a long image file would have never fitted on the disk.
  261.  
  262. Also writing an image file to the same disk is done in two parts. First 
  263. everything is written into memory. Then the user is asked to insert a
  264. second disk. Then the data is written to the newly inserted disk. If
  265. you want to copy a file to the same disk as where the copy came from,
  266. use:
  267.   
  268.     - the /t switch: don't ask target disk if copying to same disk; or
  269.     - set ASKTDISK to NO in the .ini file
  270.    
  271. Rawrite compatibility.
  272. ----------------------
  273. The image files supported by diskcopy are now also compatible with rawrite
  274. image files (commonly used with linux distributions and the FreeDOS 
  275. distribution). 
  276.  
  277. Diskcopy can thus be used to create the images for use with rawrite. There
  278. is only one thing to notice here. Because diskcopy uses DOS to find out the
  279. disk sizes for the diskettes it can only work with FAT. Reading from non DOS
  280. disks is impossible. 
  281.  
  282. On the other hand writing to a disk formatted to use FAT is possible no
  283. matter what the image file itself contains. If there is an other file system
  284. on the diskette format a: /q can be use before writing an image file to
  285. the diskette.
  286.  
  287. Windows compatibility.
  288. ----------------------
  289. Because diskcopy only uses DOS to copy disks it can be used to write in a
  290. DOS box under windows without having to lock the drives first. Any boot 
  291. sector will be written correctly so that the disk will be bootable.
  292.  
  293. Diskcopy fully supports long file names. To support long file names a driver
  294. does however need to be loaded. For FreeDOS LFNDOS and DOSLFN are available.
  295. Under windows NT you can use NTLFN. See 
  296. http://www.cybertrails.com/~fys/longfile.htm for more information concerning
  297. these drivers and where to get them.
  298.  
  299. Under windows 95 or 98 the driver is included directly in the operating system
  300. and no special driver is needed.
  301.  
  302. Diskcopy.ini file.
  303. ------------------
  304. In order to facilitate using diskcopy you can optionally create a 
  305. diskcopy.ini file to store the options you use often.
  306.  
  307. The structure of a diskcopy.ini is pretty standard:
  308.  
  309. There are three headers for the selection of options:
  310.  
  311.         [- OPTION -]
  312.  
  313. and
  314.  
  315.         [- MEMORY-]
  316.  
  317. and 
  318.  
  319.         [- GENERATE -]
  320.  
  321. which form blocks containing option statements. 
  322.  
  323. (The "-" in "[-" and "-]" is optional)
  324.  
  325. Option statements are of the form:
  326.  
  327.         LVALUE = RVALUE
  328.  
  329. where the "=" and the RVALUE are optional (if the RVALUE is not entered
  330. nothing happens). 
  331.  
  332. The option statements that can be used in a [- OPTION -] block are:
  333.  
  334. audible = YES 
  335. audible = NO
  336.         
  337.         turns the audible warning before user action on or off.
  338.  
  339. verify = YES
  340. verify = NO
  341.  
  342.         turns verification on or off.
  343.  
  344. askdisk = YES
  345. askdisk = NO
  346.  
  347.         determines wether a disk is asked to be inserted.
  348.  
  349. asktdisk = YES
  350. asktdisk = NO
  351.  
  352.      When copying an image file to the same disk as the one that is being 
  353.      copied, the program normally asks to insert a new disk. When setting
  354.      this option to NO the image file is directly written directly to the
  355.      disk without asking for an other disk.
  356.  
  357. informative = YES
  358. informative = NO
  359.  
  360.         determines wether the memory type is shown.
  361.  
  362. overwrite = ALWAYS
  363. overwrite = NEVER     
  364.  
  365.         determines wether to overwrite the destination, if the destination
  366.         is an image file.
  367.  
  368. autoexit = YES
  369. autoexit = NO
  370.  
  371.         determines wether the program should automatically exit.
  372.  
  373. mode = RECOVERY
  374. mode = NORMAL
  375.  
  376.         determines wether the program should allways be in recovery mode
  377.         or not.
  378.  
  379. The option statements that can be used in a [- MEMORY -] block are:
  380.  
  381. XMS = YES
  382. XMS = NO
  383.  
  384.         determines wether XMS memory can be used.
  385.  
  386. EMS = YES
  387. EMS = NO
  388.  
  389.         determines wether EMS memory can be used.
  390.  
  391. DISK = YES
  392. DISK = NO
  393.  
  394.         determines wether a swap file can be used.
  395.  
  396. SPEED = FULL
  397. SPEED = FAST
  398.  
  399.         perform fast disk copy or generate small image files if 
  400.         "SPEED = FAST" is used
  401.  
  402. SERIALNUMBER = LEAVE
  403. SERIALNUMBER = UPDATE
  404.  
  405.         when setting this option to LEAVE the serial number is not updated.
  406.         when setting it to UPDATE the serial number is updated.
  407.  
  408. The option statement that can be used in a [- GENERATE -] block is:
  409.  
  410. USEDATFILE = YES
  411. USEDATFILE = NO
  412.  
  413.         determines wether a compiled ini file should be generated 
  414.         (see further).
  415.  
  416. The diskcopy.ini file is looked up in the following places and in the 
  417. following order:
  418.  
  419. 1) the environment variable "dkcpini" can point to a directory where 
  420.    the diskcopy.ini file is located. If no diskcopy.ini file is found 
  421.    or the directory does not exist the search is continued.
  422. 2) the executable's directory.
  423. 3) the current directory.
  424.  
  425. Notes: 1) DOS shoudn't be case sensitive so diskcopy isn't either.
  426.        2) command line options overwrite the options in the diskcopy.ini 
  427.           file.
  428.  
  429. Compiled ini file.
  430. ------------------
  431.  
  432. In a previous version of diskcopy the .ini file had to be interpreted each
  433. time the program is used. 
  434.  
  435. An .ini file is by definition a file that is written once for many uses. 
  436. Therefore the speed of reading an .ini file can  be increased by generating 
  437. a seperate file containing that contains only the essential information 
  438. contained in an .ini file and using that file as long as the .ini file has 
  439. not changed.
  440.  
  441. By using a simple entry in the .ini file such a file is generated with the
  442. name diskcopy.dat. The entry is:
  443.  
  444. USEDATFILE = YES 
  445. USEDATFILE = NO
  446.  
  447. When the option is set to YES a diskcopy.dat file is generated whenever 
  448. the .ini file is changed. 
  449.  
  450. That the .ini file is newer is checked using the normal way by looking at 
  451. the file time. (This is thus the same method used by the make utility).
  452.  
  453. A few checks are build in to ensure that any file with the name diskcopy.dat
  454. is realy a diskcopy generated file. If the file is not valid it will not be
  455. used. The file, however, can be overwritten when generating a new 
  456. diskcopy.dat file.
  457.  
  458. Multi language support
  459. ----------------------
  460.  
  461. FreeDOS diskcopy has multi language support. To change to an other language
  462. then the default language (english) you should use two enviroment
  463. variables:
  464.  
  465.  nlspath = <path>
  466.         This environment variable should point to the directory where
  467.         your multi language files are located.
  468.  
  469.  lang = <language code>
  470.         This environment variable defines the code for the language
  471.         you want to use.
  472.  
  473. These two variables point to a file called:
  474.  
  475.   <nlspath>\diskcopy.<lang>
  476.   
  477. For example:
  478.  
  479.   c:\freedos\nls\diskcopy.en
  480.  
  481. If you installed the FreeDOS distribution you should already have files
  482. in this directory. 
  483.  
  484. An other method exist of using nlspath and lang to point to directories
  485. like:
  486.  
  487.   <nlspath>\<lang>\diskcopy
  488.  
  489. For example:
  490.  
  491.   c:\freedos\nls\en\diskcopy
  492.  
  493. Notice that this file does not have an extension.
  494.  
  495. The currently supported languages are dutch, german and english. If you want
  496. support for an other language you should translate the strings in the 
  497. diskcopy.en file. You can do this without changing the sources.
  498.  
  499. If you do translate the language file. Please send them to me 
  500. (imre.leber@worldonline.be). Jim Hall will probably also accept these files
  501. you can reach him at jhall@freedos.org. 
  502.  
  503. Examples.
  504. ---------
  505.  
  506. Diskcopy a: a: /a /i
  507.  
  508.     Copy a floppy disk from a: to a:, give a beep before user action and show
  509.     memory usage.
  510.  
  511. Diskcopy a: example.img
  512.  
  513.     Copy the contents of the floppy disk in drive a: to the image file
  514.     example.img.
  515.  
  516. Diskcopy example.img a:
  517.  
  518.     Copy the contents of the file example.img to the floppy disk in drive a:
  519.  
  520. Diskcopy example1.img example2.img
  521.  
  522.     Copy the file example1.img to the file example2.img. 
  523.  
  524. Diskcopy a: a: /a-
  525.  
  526.     Copy the contents of the disk in drive a: to another disk in drive a:,
  527.     making sure there is no beep for user action.
  528.  
  529. Diskcopy a: a:a /f
  530.  
  531.     Create a small image file of drive a: on drive a:
  532.  
  533.     Notice that in this case:
  534.     - The program can give an out of memory error if the entire contents
  535.       can not be copied in one time.
  536.     - The resulting file "a" is not included in the image file.
  537.  
  538. Diskcopy a:a a:, or identically: diskcopy a:a a: /f
  539.  
  540.     Copy the image file "a" on drive a: to drive a:
  541.  
  542.     Notice that in this case:
  543.     - The user will be asked to insert a new floppy.
  544.  
  545. Diskcopy a:a a: /t
  546.  
  547.     Copy the image file "a" on drive a: to drive a:
  548.  
  549.     Notice that in this case:
  550.     - The contents of drive a: is overwritten. So the image file is gone too!
  551.  
  552.                                     *
  553.                                    * *
  554.  
  555. The following example shows the defaults for a diskcopy.ini file (using 
  556. these values is the same as not using a diskcopy.ini file at all).
  557.  
  558.         [- MEMORY -]
  559.         DISK  = YES             # SWAP file allowed  
  560.         XMS   = YES             # XMS allowed
  561.         EMS   = YES             # EMS allowed
  562.  
  563.         [- OPTIONS -]
  564.         AUDIBLE      = NO       # don't use a beep before asking for input
  565.         VERIFY       = NO       # don't verify read and writes
  566.         INFORMATIVE  = NO       # don't show memory usage
  567.         OVERWRITE    = NEVER    # never overwrite an existing file
  568.         AUTOEXIT     = NO       # don't automatically exit
  569.         MODE         = NORMAL   # not in recovery mode
  570.         ASKDISK      = YES      # ask for a disk before copying
  571.         SPEED        = FULL     # copy all sectors
  572.         ASKTDISK     = YES      # ask for a disk when creating an image file
  573.                                 # on the same disk
  574.  
  575.         [- GENERATION -]
  576.         USEDATFILE   = NO       # Use the DAT file 
  577.  
  578. Another example illustrating the more liberal syntaxis is:
  579.         
  580.         [- MEMORY ]
  581.         EMS   = YES
  582.  
  583.         [ OPTIONS -]
  584.         AUDIBLE       NO
  585.         VeRiFy       = NO
  586.         INFORMATIVE
  587.         OVERWRITE    = NeVeR
  588.         AUTOEXIT     #= NO
  589.         MODE         =# NORMAL
  590.         #ASKDISK      = YES
  591.         
  592.         [ MEMORY ]
  593.         DISK  = YES
  594.         XMS   = YES
  595.  
  596.  
  597. Planned improvements.
  598. ---------------------
  599.  
  600. None, it is stable and works under FreeDOS. And it is already to large for 
  601. most people.
  602.  
  603.