home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol10n21.zip / PCTODAY.ZIP / PCTODAY.DOC < prev    next >
Text File  |  1991-10-31  |  6KB  |  137 lines

  1.  
  2.  
  3. PCTODAY.COM & PCCOPY.COM             December 17, 1991
  4.  
  5. Ethan Winer
  6.  
  7. Purpose:  PCTODAY & PCCOPY make backing up your day's work quick and
  8. convenient. PCTODAY scans all the files on your hard disk and makes a
  9. list of all the files bearing the date specified. PCCOPY then uses
  10. the list to copy those files to your designated destination.
  11.  
  12.  
  13. The full syntax for PCTODAY is
  14.  
  15. PCTODAY [d:] [/d mm-dd-yyyy] [> filename.ext]
  16.  
  17.      Entered without any command line arguments, PCTODAY displays the
  18. drive, directory, filename, and date of all files modified on the
  19. current date. Files with read-only, hidden, and system attributes
  20. are included. The listing pauses at the end of each screen page
  21. (if more than one is needed) and serves as a reminder of which files
  22. may need to be backed up. 
  23.  
  24.      By adding the optional /d switch, followed by any legal DOS date
  25. in standard mm-dd-yyyy format, you can force PCTODAY to include
  26. earlier-dated files. To limit the drives in the search path or to
  27. include network and floppy disks drives, just specify them individually
  28. on the PCTODAY command line. (It's important that you remember to
  29. include the colon after each drive letter.)  For example, to see a
  30. list of the files on drives C: and D: (only) with file dates on or
  31. after November 25, you would enter the line
  32.  
  33. PCTODAY C: D: /D 11-25-1991
  34.  
  35.  
  36. Any number of drives can be similarly specified. Spacing is not
  37. crucial in any of the command line arguments, and drive letters and
  38. the date can be listed in any order or even intermixed.
  39.  
  40.      To send the list to a file (for use by PCCOPY) instead of to
  41. the display, use the standard DOS redirection symbol (>) followed
  42. by any legal filename. You can put such a FILENAME.EXT on another
  43. drive, if desired. Thus, given the command
  44.  
  45. PCTODAY > D:LOGFILE.B25
  46.  
  47. PCTODAY will create LOGFILE.B25 as a filename (which is also known as a
  48. response file; see the syntax for PCCOPY) in the default directory of
  49. drive D:.  LOGFILE.B25 contains the names of each file to be backed
  50. up in the same order as they would appear on-screen; however, it omits the
  51. file dates, the blank lines between directories, and the sign-on
  52. message. Restricting the listing to filenames only makes it easier
  53. for PCCOPY to process the list.
  54.  
  55.      In addition to using a PCTODAY list file as a source for PCCOPY,
  56. you can use it with PKWARE's popular PKZIP file compression utility.
  57. PKZIP lets you specify that the filenames to be processed are to be
  58. found in a response file rather than entered on the DOS command line.
  59. Thus, the three-line batch file 
  60.  
  61. PCTODAY > PCTODAY.RSP
  62. PKZIP PCTODAY.ZIP @PCTODAY.RSP
  63. COPY PCTODAY.ZIP A:
  64.  
  65. will back up the day's work for your entire system into a compressed
  66. .ZIP file stored on drive A:.  Note, however, that in this case you
  67. must be sure that after compression the .ZIP file will fit on a single
  68. floppy disk. If the .ZIP file is too large to fit on a single floppy,
  69. you may want to use SLICE, a PC Magazine utility that lets you store
  70. one file on multiple floppy disks.
  71.  
  72.  
  73. USING PCCOPY
  74.  
  75. The full syntax of the PCCOPY utility is
  76.  
  77. PCCOPY Source [Destination] [/x filespec]
  78.  
  79.                  or
  80.  
  81. PCCOPY @Responsefile [Destination]
  82.  
  83. Used as a standalone utility, PCCOPY works in much the same way as
  84. the DOS COPY command, except that it restricts its processing
  85. specifically to those files that need to be copied. If the destination
  86. drive or directory has an identical or newer file of the same name,
  87. PCCOPY will not overwrite it. That can save you a substantial amount
  88. of time when many large files are involved. To copy all unduplicated
  89. files from your current directory to the \WORK directory on network
  90. drive H:, you would enter:
  91.  
  92. PCCOPY *.* H:\WORK
  93.  
  94.      As with COPY, you can omit the destination argument if you wish
  95. to copy to your current drive and directory. And if a source or
  96. destination drive is given but a path is not, the current directory
  97. for that drive will be used.
  98.  
  99.      The final--and potentially most powerful--feature of
  100. PCCOPY when used as a standalone utility is its ability to exclude
  101. one or more groups of files. Files to be excluded are identified with
  102. the /x command line argument, followed by an identifying filespec, as
  103. shown in the following line:
  104.  
  105. PCCOPY *.* H:\MYDIR /X *.BAK
  106.  
  107. In this example, the DOS wildcard * is used as part of the exclude
  108. specification to prevent the copying of any files that have a .BAK
  109. extension.
  110.  
  111.      The ? and * wildcards can be applied to any common parts of a
  112. group of filenames, of course--not simply to an extension--and PCCOPY
  113. supports the use of up to ten different exclude specifications. The
  114. placement of the /x specifications is not important; they can even be
  115. intermixed with the source and response file (@responsefile)
  116. parameters.  Note, however, that the /x switch is recognized only when
  117. PCCOPY is working with a source filespec. As explained below, filenames
  118. contained in a reponse file are copied unconditionally; any /x commands
  119. are simply ignored.
  120.  
  121.      To use PCCOPY with PCTODAY, you begin by having the latter create
  122. a response file (arbitrarily named LOGFILE.B25 previously). Then,
  123. instead of supplying PCCOPY with a filespec, you tell it to copy the
  124. files listed in this response file by preceding it with an at sign (@), as follows:
  125.  
  126. PCCOPY @LOGFILE.B25 A:
  127.  
  128.      Although you will presumably use PCTODAY to create the response
  129. file most of the time, any group of files can be put into a response
  130. file. Remember, however, that when a response file is used with
  131. PCCOPY, the copying is unconditional: All the files in a response file
  132. will be copied, whether or not they are newer than the same-named
  133. files on the target drive and directory.
  134.  
  135.      If at any time you forget the syntax for either PCTODAY or PCCOPY,
  136. entering the command with the /? switch will display the syntax.
  137.