home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / TECLADO / DMOVE4.ZIP / DMOVE.TXT < prev   
Encoding:
Text File  |  1989-10-22  |  12.1 KB  |  327 lines

  1.                      Dmove/Dcopy Version 4.0
  2.                          DannySoft Inc.
  3.                         Daniel B. Doman
  4.                       166 East 96th Street
  5.                       New York, N.Y. 10128
  6.                        Voice: 212-289-1024
  7.                        Data:  212-427-1805
  8.  
  9.  
  10.   (c) Copyright  Daniel B. Doman 1983-89.  All rights reserved
  11.  
  12. If you are using Dmove and find it of value, your gift in any 
  13. amount ($20 suggested)  will be  greatly appreciated.   Please
  14. make  checks payable in U.S. dollars to  DannySoft Inc.
  15.  
  16. For use by corporations and other institutions, please contact me
  17. for a licensing  arrangement. Customizing,  licensing  of  the 
  18. source, and other special licensing are available upon request. 
  19. Purchase orders and invoicing are acceptable.
  20.  
  21. You may not charge for the use of Dmove or Dcopy without the
  22. written permission of the author. Feel free to freely distribute
  23. this program provided that no fee is charged for such copying and
  24. distribution, and that it is distributed ONLY in its original,
  25. unmodified state, including this documentation.   
  26.  
  27. Dmove is a file mover/copier. It can MOVE files and directory
  28. trees, or just copy them. Various command line switches allow you
  29. to specify which files will be copied, and how to handle
  30. duplicates and errors.
  31.  
  32. Dmove was originally written to be a file mover only, but many
  33. users were so frustrated with the performance and bugs in DOS
  34. XCOPY that the '/C' copy switch was added. As long as I was at
  35. it, I added the /R replace switch as well. The first two versions
  36. of Dmove were called Cmove, but the name was changed to match the
  37. naming convention used with other programs from DannySoft.
  38.  
  39. Dmove will work effectively on Local and Network drives. Unlike
  40. many versions of XCOPY and REPLACE, Dmove is not DOS version
  41. sensitive. It will work with all versions of DOS from 2.x throgh
  42. 4.x..
  43.  
  44. An alternative version of Dmove is enclosed called Dcopy. This is
  45. really the same program but defaulted to COPY files instead of
  46. MOVE'ing them. "Dmove /C" and "Dcopy /M" would achieve the same
  47. effect.
  48.  
  49. Below are the various command line switches you can use with
  50. Dmove, and a brief description of what they do.
  51.     
  52.  
  53. /E   Try To Move/Copy Additional Files After An Error. By default
  54.      Dmove will stop moving/copying files after the first error.
  55.      This switch will tell Dmove to try to continue with other
  56.      files. This switch DOES NOT cause Dmove to IGNORE errors. If
  57.      you are trying to move/copy as many files as possible to a
  58.      target drive, you can might want to use this switch.
  59.  
  60. -H   Also copy Hidden files.
  61.  
  62. -I   Move/Copy even if source target are identical. By default,
  63.      Dmove will skip any file that has an identical twin for a
  64.      target. The /Ignore switch tells Dmove to Move/Copy even
  65.      though a file identical to the source file already exists in
  66.      the target directory. Dmove considers any file with the same
  67.      name, size, and exact date and time to be the same.
  68.  
  69. -ND  Fail If Destination Directory Does Not Exist. By default,
  70.      Dmove will create the target directory path if it does not
  71.      already exist. This switch will force Dmove to fail if the
  72.      target path does not already exist.
  73.  
  74. -NA  Do not copy source file attributes. By default Dmove will
  75.      replicate the source attributes on the target. This means
  76.      that the target file will be marked read only if the source
  77.      file was. If The /H(idden) switch is also used, hidden
  78.      source files will become then visible target files. 
  79.  
  80. -S   Search And Move/Copy From Subdirectories. This switch tells
  81.      Dmove to move/copy entire directory trees. It will replicate
  82.      the source path in the target directory. It will not create
  83.      empty subdirectories.
  84.  
  85. -SE  Move/Copy all subdirectories trees INCLUDING empty
  86.      directories. 
  87.  
  88. -C   (Dmove)Copy Only. The default mode for Dmove is MOVE e.g..
  89.      files are MOVED from one location to another. This switch
  90.      tells Dmove to COPY files. 
  91.  
  92. -M   (Dcopy)Move files. The default mode for Dcopy is to COPY.
  93.      This switch tells Dcopy to move files - just like the
  94.      default mode for Dmove.
  95.  
  96. -R   Replace Only - Move/Copy only if target already exists. The
  97.      combination of the /C and /R switches can make Dmove a handy
  98.      update utility.  
  99.  
  100. -D   Move/Copy Only if source file is newer than target (if any).
  101.      This switch tells Dmove to perform a date comparison
  102.      whenever a file with the same name exists in the target
  103.      path. If there is no file with the same name in the target
  104.      path, Dmove will Move/Copy anyway.
  105.  
  106. -U   Update - Replace with newer files. This switch is really the
  107.      same as /R/D.
  108.  
  109. -T   Retain the target path for subsequent commands. This command
  110.      lets you use a bit of shorthand with Dmove. By default Dmove
  111.      tries to think of each command as a "From-To" pair. The
  112.      /T(arget) switch tells Dmove to keep using the last target
  113.      specified. This can be handy when you are moving/copying
  114.      from several different directories to a single target, or
  115.      when you are moving/copying files with several specific
  116.      extensions and you are running out of DOS command line room.
  117.      If the source arguments do not contain wildcards, you must
  118.      separate each command with a semi-colon so that Dmove can
  119.      distinguish one source from another.
  120.  
  121. -T={Path}
  122.  
  123.      This variation on the "/T" switch would allow you to specify
  124.      a constant target directory before subsequent source
  125.      arguments. The constant target directory will still be
  126.      overridden by later target arguments. This command may be
  127.      especially useful if you pass Dmove a list of filename
  128.      arguments to move in a @filename argument.
  129.  
  130. @File
  131.  
  132.      Arguments can also be passed in a file. There is no limit to
  133.      the number of filename arguments that you can pass on the
  134.      command line. Filename arguments can themselves include
  135.      other filename arguments. The maximum depth of inclusion is
  136.      5. If you need more than that you are probably on drugs.
  137.      Warning! Be sure that you do not accidentally `move' your
  138.      include file while the Dmove is still reading from it!
  139.  
  140. -DOS
  141.  
  142.      Parse an @Include file generated from a DOS DIR command.
  143.      This command MUST be used in conjunction with the /T=
  144.      switch. When using this switch, ONLY @Include files
  145.      generated with a DOS DIR command. This command can be very
  146.      handy when wildcard arguments cannot suffice. For example,
  147.      you might want to move/copy ALL but certain .EXE files from
  148.      the current directory. You could generate a file list with
  149.      DOS DIR command, and then edit out the files you do not want
  150.      to move/copy before handy the file list to Dmove/Dcopy with
  151.      an @Include command. Any line which begins with a space is
  152.      ignored. 
  153.  
  154.  
  155.  
  156.                          How Dmove Works
  157.  
  158.  
  159. Dmove moves files as efficiently as it can. If the source and
  160. target paths APPEAR to be on the same drive, Dmove will try to
  161. rename the source name to the target name. If that effort fails,
  162. or the source and target path do not appear to be on the same
  163. drive, Dmove will create a copy of the source file in the target
  164. path, and unless the /C(opy) switch has been specified, delete
  165. the source file. Dmove compares the source and target arguments
  166. for a drive letter, so you can force a physical copy instead of a
  167. rename if you specify a drive letter in one path argument but not
  168. the other.
  169.  
  170. Dmove will delete the source directories if it is not COPYing and
  171. if the source directories are emptied.
  172.  
  173. File attributes, including the read/only and system attributes
  174. will be replicated in the target file, but as a safety measure,
  175. Dmove will not operate on hidden files unless the /H switch is
  176. used.
  177.  
  178. A path or drive letter given as the source argument will be
  179. interpreted as all files (*.*).
  180.  
  181. Dmove parses all command line switches first, so they can be
  182. given in any order, and anywhere on the command line.
  183.  
  184. When you specify a drive letter only for the target this means
  185. the `current directory' on that drive. Some Novell shells have
  186. problems with certain DOS functions when used this way, so Dmove
  187. appends a ".\" to the drive letter. Thus "M:DooDah.Com" becomes
  188. "M:.\DooDah.Com".
  189.  
  190.                      Command Line Parsing
  191.  
  192. Dmove generally expects arguments in Source/Target format. A semi
  193. colon following an argument can be used to mark the end of a
  194. command.  If no target argument is found, the default directory
  195. is used unless the /T{=} switch was used.
  196.  
  197. If a second argument contains a wildcard, Dmove understands that
  198. this is the source argument of the next command, and will assume
  199. that no target was specified for the previous command. Thus
  200. "Dmove /c d:*.exe f:*.exe g:*.exe" would copy all .EXE files from
  201. the current directory on drive D, F, & G to the current directory
  202. of this drive.
  203.  
  204. If you pass in filename arguments, Dmove will parse them as part
  205. of the command line stream. Carriage returns in a filename
  206. argument are treated like semi-colons e.g.. end_of_a_command. If
  207. you are using the /DOS switch, the only @Files that you can use
  208. are Dos Directory files.
  209.  
  210.   Examples
  211.  
  212.  
  213. Dmove  \foo\*.*  YaYa
  214. Dmove  \foo      YaYa
  215.  
  216.      -    Move all files from subdirectory foo to
  217.         subdirectory YaYa
  218.  
  219. Dmove \foo   ..
  220.  
  221.      -    Move all files from subdirectory \Foo to the
  222.         PARENT of the current directory 
  223.  
  224. Dmove . ..
  225.  
  226.      -    Move all files from the current directory to the
  227.         Parent of the current directory
  228.  
  229. Dmove  \foo      YaYa /C
  230.  
  231.      -    COPY all files from subdirectory foo to
  232.         subdirectory YaYa
  233.  
  234. Dmove  \foo      YaYa /C/S
  235.  
  236.      -    COPY all files and subdirectories from
  237.         subdirectory foo to subdirectory YaYa
  238.  
  239. Dmove a:
  240.  
  241.      -    Move all files from Drive A: to the current drive
  242.         and directory
  243.  
  244. Dmove \newstuff a:\ /U/C
  245.  
  246.      -    Update A: with new files from directory \Newstuff.
  247.         Copy Only
  248.  
  249. Dmove  C:\newstuff \newstuff\ya
  250.  
  251.      -    Copy files from directory Newstuff to a
  252.         subdirectory of Newstuff "YA", force a physical
  253.         copy instead of a rename
  254.  
  255. Dmove \foo; \Glue; \YoMaMa;
  256.  
  257.      -    Move all files from directories  \Foo, \Glue, and
  258.         YoMaMa to the current directory
  259.  
  260. Dmove a:\ /s/c
  261. Dmove a:  /s/c
  262.  
  263.      -    COPY all files and directories to the current
  264.         drive and directory
  265.  
  266. Dmove d:\*.* P:\Backup /S/C
  267.  
  268.      -    Copy Everything On Drive D: to P:\Backup
  269.  
  270. Dmove \zot Glot; \Pookie; \Droopie; /t
  271.  
  272.      -    Move all files from subdirectories \Zot \Pookie
  273.         and \Droopie to the subdirectory Glot. Note use of
  274.         semi-colon
  275.  
  276. Dmove \Here\*.dat \Foo\Yahoo /ND
  277.  
  278.      -    Move Fails if "\Foo\Yahoo" Does Not Exist
  279.  
  280. Dmove \*.exe \*.com \*.bat /C
  281.  
  282.      -    Copy all .EXE, .COM and .BAT files from the root
  283.         directory to the current directory
  284.  
  285. Dmove @ARGS
  286.  
  287.      -    Take all commands from the filename ARGS
  288.  
  289. Dmove /C/T=D:\BACKUP @FILES.LST
  290.  
  291.      -    Copy all files in FILES.LST to D:\BACKUP
  292.  
  293. Dmove YaYa.Doc \NewDir @FILE.LST /T
  294.  
  295.      -    Copy YaYa.Doc and the Files In FILES.LST To \NewDir
  296.  
  297. Dmove /T=F:\Flatulo /DOSFILE @DOSDIR.LST /C
  298.  
  299.      -    Copy the files listed in DOSDIR.LST to directory
  300.         F:\Flatulo. The DOSDIR.LST file was generated with a
  301.         DOS command such as "DIR *.DOC >DOSDIR.LST"
  302.  
  303. Changes from Version 3.0:
  304.  
  305. -    @Filename argument support and /T={path} switch added. The
  306.      @Filename allows commands and/or lists of files to be passed
  307.      in a filename argument, rather than just on the command
  308.      line.
  309.  
  310. -    Added logic to treat wildcards in a second argument as part
  311.      of the next source/target pair e.g.. dmove  \*.xxx \*.zzz 
  312.  
  313. -    Added test against DTA blocks in order to trap attempts to
  314.      copy/move a file to itself
  315.  
  316. -    Additional switches added to move/copy empty directory
  317.      trees, and hidden files.
  318.  
  319. -    Added an alternate form of Dmove called Dcopy which defaults
  320.      to "Moving" files instead of copying them.
  321.  
  322. Fixes:
  323.  
  324. -    Certain types of Disk I/O errors were causing Dmove to abort
  325.      without deleting its work files.
  326.  
  327.