home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol10n21.zip
/
PCTODAY.ZIP
/
PCTODAY.DOC
< prev
next >
Wrap
Text File
|
1991-10-31
|
6KB
|
137 lines
PCTODAY.COM & PCCOPY.COM December 17, 1991
Ethan Winer
Purpose: PCTODAY & PCCOPY make backing up your day's work quick and
convenient. PCTODAY scans all the files on your hard disk and makes a
list of all the files bearing the date specified. PCCOPY then uses
the list to copy those files to your designated destination.
The full syntax for PCTODAY is
PCTODAY [d:] [/d mm-dd-yyyy] [> filename.ext]
Entered without any command line arguments, PCTODAY displays the
drive, directory, filename, and date of all files modified on the
current date. Files with read-only, hidden, and system attributes
are included. The listing pauses at the end of each screen page
(if more than one is needed) and serves as a reminder of which files
may need to be backed up.
By adding the optional /d switch, followed by any legal DOS date
in standard mm-dd-yyyy format, you can force PCTODAY to include
earlier-dated files. To limit the drives in the search path or to
include network and floppy disks drives, just specify them individually
on the PCTODAY command line. (It's important that you remember to
include the colon after each drive letter.) For example, to see a
list of the files on drives C: and D: (only) with file dates on or
after November 25, you would enter the line
PCTODAY C: D: /D 11-25-1991
Any number of drives can be similarly specified. Spacing is not
crucial in any of the command line arguments, and drive letters and
the date can be listed in any order or even intermixed.
To send the list to a file (for use by PCCOPY) instead of to
the display, use the standard DOS redirection symbol (>) followed
by any legal filename. You can put such a FILENAME.EXT on another
drive, if desired. Thus, given the command
PCTODAY > D:LOGFILE.B25
PCTODAY will create LOGFILE.B25 as a filename (which is also known as a
response file; see the syntax for PCCOPY) in the default directory of
drive D:. LOGFILE.B25 contains the names of each file to be backed
up in the same order as they would appear on-screen; however, it omits the
file dates, the blank lines between directories, and the sign-on
message. Restricting the listing to filenames only makes it easier
for PCCOPY to process the list.
In addition to using a PCTODAY list file as a source for PCCOPY,
you can use it with PKWARE's popular PKZIP file compression utility.
PKZIP lets you specify that the filenames to be processed are to be
found in a response file rather than entered on the DOS command line.
Thus, the three-line batch file
PCTODAY > PCTODAY.RSP
PKZIP PCTODAY.ZIP @PCTODAY.RSP
COPY PCTODAY.ZIP A:
will back up the day's work for your entire system into a compressed
.ZIP file stored on drive A:. Note, however, that in this case you
must be sure that after compression the .ZIP file will fit on a single
floppy disk. If the .ZIP file is too large to fit on a single floppy,
you may want to use SLICE, a PC Magazine utility that lets you store
one file on multiple floppy disks.
USING PCCOPY
The full syntax of the PCCOPY utility is
PCCOPY Source [Destination] [/x filespec]
or
PCCOPY @Responsefile [Destination]
Used as a standalone utility, PCCOPY works in much the same way as
the DOS COPY command, except that it restricts its processing
specifically to those files that need to be copied. If the destination
drive or directory has an identical or newer file of the same name,
PCCOPY will not overwrite it. That can save you a substantial amount
of time when many large files are involved. To copy all unduplicated
files from your current directory to the \WORK directory on network
drive H:, you would enter:
PCCOPY *.* H:\WORK
As with COPY, you can omit the destination argument if you wish
to copy to your current drive and directory. And if a source or
destination drive is given but a path is not, the current directory
for that drive will be used.
The final--and potentially most powerful--feature of
PCCOPY when used as a standalone utility is its ability to exclude
one or more groups of files. Files to be excluded are identified with
the /x command line argument, followed by an identifying filespec, as
shown in the following line:
PCCOPY *.* H:\MYDIR /X *.BAK
In this example, the DOS wildcard * is used as part of the exclude
specification to prevent the copying of any files that have a .BAK
extension.
The ? and * wildcards can be applied to any common parts of a
group of filenames, of course--not simply to an extension--and PCCOPY
supports the use of up to ten different exclude specifications. The
placement of the /x specifications is not important; they can even be
intermixed with the source and response file (@responsefile)
parameters. Note, however, that the /x switch is recognized only when
PCCOPY is working with a source filespec. As explained below, filenames
contained in a reponse file are copied unconditionally; any /x commands
are simply ignored.
To use PCCOPY with PCTODAY, you begin by having the latter create
a response file (arbitrarily named LOGFILE.B25 previously). Then,
instead of supplying PCCOPY with a filespec, you tell it to copy the
files listed in this response file by preceding it with an at sign (@), as follows:
PCCOPY @LOGFILE.B25 A:
Although you will presumably use PCTODAY to create the response
file most of the time, any group of files can be put into a response
file. Remember, however, that when a response file is used with
PCCOPY, the copying is unconditional: All the files in a response file
will be copied, whether or not they are newer than the same-named
files on the target drive and directory.
If at any time you forget the syntax for either PCTODAY or PCCOPY,
entering the command with the /? switch will display the syntax.