home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
DISK_UTL
/
TARGET15.ZIP
/
TARGET.DOC
< prev
next >
Wrap
Text File
|
1992-07-21
|
29KB
|
909 lines
Target
The McAfee File Locator and Manipulator V1.5
Copyright McAfee Associates 1992
McAfee Associates (408) 988-3832 office
3350 Scott Blvd, Bldg. 14 (408) 970-9727 fax
Santa Clara, CA 95054 (408) 988-4004 BBS (32 lines)
U.S.A. USR HST/v.32/v.42bis/MNP1-5
CompuServe GO MCAFEE
InterNet mcafee@netcom.COM
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . 2
Using Target . . . . . . . . . . . . . . . . . . . . . . 4
File Search Facilities . . . . . . . . . . . . . . . . . 4
File Manipulation Facilities . . . . . . . . . . . . . 11
The Target and Target_DRIVES Environment Variables . . 13
Registration . . . . . . . . . . . . . . . . . . . . . 15
Technical Support . . . . . . . . . . . . . . . . . . 15
Authenticity . . . . . . . . . . . . . . . . . . . . . 16
History . . . . . . . . . . . . . . . . . . . . . . . 17
Page 1
Target Version 1.5 Page 2
INTRODUCTION
Target is a powerful, multi-purpose file finder and manipulator utility.
It can target selected files across all drives, including logged network
drives, and can initiate actions on those files such as virus scanning,
file copying, renaming, re-grouping, deleting, archiving and multiple
other functions. It can search based on date ranges, file sizes, archive
condition, file types or duplicate files, and can use a variety of search
masks - including regular expressions.
Target can perform a wide range of manipulations on files that are
found, ranging from simple deletions, or scans for viruses, to complex
re-structurings or re-orderings. As an example of the nearly unlimited
uses for Target, each of the following tasks can be performed with one
simple Target command:
- Target all .DOC files located in all sub-directories of local
drives and file server drives and incorporate them into
one ZIP archive file, and then delete all of the unarchived
DOC files.
- Target all files on all drives that were modified in the past
five days and copy the files to floppy diskette for backup
purposes.
- Remove all files from within your archives that are more
than 5 years old.
- Target all files with a given extension on your file server
and move them into one sub-directory.
- Create an archive of all files that are greater than 2
megabytes long.
- Search all drives for files that have the numbers 1 through 5
as the last character of the filename and scan those files for
viruses.
- Determine wasted space occupied by backup files, archives, old
files, or any other file classifications.
Target provides a number of search options, including:
o The ability to search inside ARC, ZIP, PKA, PAK,
ZOO, ARJ, and LZH archived files.
o The ability to search for files that have been
compressed with PKWare's PKLite program.
Target Version 1.5 Page 3
o True regular expression searching on filenames.
o The ability to display duplicate entries across all of
your disk drives, including those duplicates that are in
archive files.
o Excluding files from a search based on a search mask.
o The ability to do restrictive searches on such criteria
as file date ranges and file sizes, archive bit settings,
hidden file flags and other file characteristics.
Target Version 1.5 Page 4
USING TARGET
FILE SEARCH FACILITIES
Locating files with Target is simple and intuitive. If you do not
specify a path, then Target will search the entire default drive. If you
specify a starting path, then the search will occur from that path downward.
Here are some basic command line examples:
Target ab*.c search entire default drive for any filename
matching "ab*.c".
Target \turboc\ab*.c search downward from the \turboc\ directory
on the default drive looking for "ab*.c".
Target d:*.dat -a search entire drive d: and all archive files
on drive d: looking for "*.dat".
Target cd:*.dat -a search entire drive c: and drive d: and all
archive files looking for "*.dat".
Target myprog search entire default drive looking for
"myprog.*" (Target will append a ".*" to
a filename with no extension specified).
Target myprog. search entire default drive looking for
"myprog". If you specify a "." after a
filename, Target will not append an "*" to it.
Command Line Switches
Switch: -A
Meaning: search all archive files
Description: The '-a' switch tells Target to look in any archive file
encountered for a matching filename. If a matching filename
is found, it will be displayed in parenthesis along with the
full name of the archive file it resides in.
Switch: -AO
Meaning: search -ONLY- archive files
Description: The '-ao' switch tells Target to ONLY look in any archive file
encountered for a matching filename. If a matching filename
is found, it will be displayed in parenthesis along with the
full name of the archive file it resides in.
Target Version 1.5 Page 5
Switch: -ARC -ARJ -PKA -LZH -ZIP -ZOO
Meaning: search only the archive formats specified
Description: These switches tell Target to only look inside the specified
types of archive files for a matching filename. For example,
if you are sure that the file named MYPROG.EXE is somewhere
on drive C: in a .ZIP file, then
Target c:myprog.exe -zip
would find the file. Specifying individual archive format
switches slightly speeds up Target, because the program doesn't
have to waste time searching for (and through) all six archive
formats.
Switch: "regular expression"
Meaning: do a grep-type search on the filename
Description: Any command line string enclosed within double quotes will be
considered a regular expression, and will cause Target to go
into its "grep mode". A regular expression can be used with
or without a filename search mask.
Target will also look inside of 4DOS description files for
the string specified. If a match is found, the normal output
line will be displayed, along with the actual 4DOS description
line below the filename line.
Special characters within the quoted string are as follows:
^ - start matching at the first character of
the filename
? - match any character in this position
[..] - range check on character at this position
The easiest way to explain is with a few examples:
Target *.bat
the regular search; will display any .BAT file found.
Target *.bat "42"
will display any .BAT file that contains the characters
"42" anywhere in the filename.
Target *.bat "^???42"
Target Version 1.5 Page 6
will display any .BAT file that contains the characters
"42" in the fourth position of the filename.
Target "[0-9]"
will display any file that contains a number anywhere in
the filename.
Target "[^0-9]"
will display any file that DOES NOT contain a number
anywhere in the filename.
Target "^???a?[acew-z]"
will display any file that contains an 'a' in the fourth
position of the filename and the letters 'a', 'c', 'e',
'w', 'x', 'y', or 'z' in the sixth position of the name.
These grep masks also work when looking inside of archive files.
Switch: -D
Meaning: search all available hard drives
Description: This switch tells Target to search every hard drive on your
system (including network drives), starting with C:. In other
words, if you have drives C:, D:, E:, and F: then the following
two command lines would do the exact same thing:
Target cdef:myprog.exe
or
Target myprog.exe -d
Note that specifying the "-d" switch overrides any drive
letters that you specify on the command line.
Switch: -DIR
Meaning: include directory names in the search
Description: This switch tells Target to also include directory names in
the search. This allows you to not only locate a lost file,
but lost directories, too.
Switch: -DUP
Meaning: Display only duplicate filenames on the drives searched
Target Version 1.5 Page 7
Description: If the -DUP switch is specified, only those files that have
duplicate entries will be displayed. All other switches are
active during -DUPlicate processing. For example, the
following command line:
Target *.bat -a -d -dup
would cause Target to search all hard drives (-d) looking for
duplicate .BAT files. Target would also look inside of all
found Archive files (-a).
NOTE: Target must keep filenames in memory when searching for
duplicate files. If an extremely large disk is being searched
for duplicates, memory problems may occur. If you get the
message "Error: out of memory!" when trying to find duplicates
across all drives, then divide the search into overlapping
areas, or search by extension or other file characteristic
to limit the number of files reviewed in a given pass.
If you are looking for duplicates on a very large drive, then
Target will take some time. Don't be alarmed if the program
seems to not be doing anything during its search.
Switch: -E
Meaning: use "*.*" for subdirectory searches
Description: By default, Target assumes that you don't have any directories
on your hard drive that have extensions in the filename. So,
when Target is looking for new directories, it will search with
a filemask of "*.". This significantly speeds up the hard drive
search. If you do have directories that have extensions in their
names, you must specify the '-e' switch or Target -will not-
find files within that subdirectory. The easiest thing to do is
to set your Target environment variable to default to this
option (see "The Target Environment Variable" below).
Switch: -F
Meaning: display filenames only
Description: This switch causes Target to display only the filename of
matching files that it finds. No header or footer information
will be displayed. This is most useful when you are
redirecting the output from Target to a file.
Switch: -G or -GF
Meaning: go to the drive and subdirectory of the found file
Description: If you specify the '-g' switch, Target will prompt you with
Goto this subdirectory? (Y/N/Q) _
whenever it finds a matching file. Press 'Y' to change to
Target Version 1.5 Page 8
the drive and subdirectory displayed, or 'N' to continue
searching the drive. You may also enter 'Q' to abort Target.
If you specify the '-gf' switch, Target will change to the
directory of the first found file without prompting you.
Switch: -H or -HO
Meaning: start searching in the current subdirectory
Description: The '-h' switch tells Target "start searching where I'm at
right now". For example, if you are currently in the TURBOC
subdirectory, then the following two commands would do the
exact same thing:
Target \turboc\myprog.c
or
Target myprog.c -h
The '-ho' switch tells Target to both (a) start in the current
directory, and (b) to ONLY search the current directory.
With this switch, Target can be used as a directory program
with the ability to list archive files. For example,
you could create the following batch file and call it
ARCDIR.BAT:
@echo off
Target %1 -ho -a
Now, when you give the command "ARCDIR", you will be shown
the directory listing, along with all files contained within
archive files in your current subdirectory.
Switch: -I
Meaning: ignore the environment variable Target
Description: The '-i' switch tells Target to ignore any default switches
that you have set with the Target environment variable.
Switch: -M -R -PL
Meaning: modify Target's default output display
Description: These switches allow you to modify the way that Target
displays its output. By default, Target will place the
filename on the left of the screen (just like DIR does).
If you prefer, you can use '-M' to place the filename in the
middle of the screen, '-R' to place the filename on the
right of the screen, or '-PL' to put the pathname on the left
of the screen. Usually set in the environment.
Target Version 1.5 Page 9
Switch: -K
Meaning: search only the PATH directories
Description: This switch will cause Target to search only the directories
that are specified in your DOS PATH environment variable.
Switch: -Y
Meaning: display the output with European-style dates (DD-MM-YY)
Switch: -W
Meaning: show wasted space occupied by matching files
Description: This switch can come in handy if you are trying
to figure out how much disk space is being wasted
by a bunch of very small files (batch files are a prime
example). Target will total and display to you the amount of
disk space that is being wasted due to cluster overhead.
Switch: -U
Meaning: display all output in upper case
Description: Some people still prefer to see directory-type listings in
ALL UPPER CASE; if you're one of these people, then just use
the '-U' switch. It's best to set this in your Target
environment variable.
Switch: -P
Meaning: no pause or wait for a key when the screen fills up
Description: Will cause Target to not pause the screen when it
fills up.
Switch: -PKLite
Meaning: search for files compressed with PKLite
Description: This switch will cause Target to only look for .COM and
.EXE files that have been compressed with PKWare's PKLITE
program. PKLite is a program that compresses executable
programs, and then un-compresses them at runtime.
Switch: -Xfilemask
Meaning: exclude this filespec from the search
Description: The '-X' switch allows you to exclude certain filenames from
the directory search. You can specify up to 25 exclusion
masks. For example, if you wanted to see all files on your
drive except for .OBJ and .PRG files, you could do:
Target *.* -x*.obj -x*.prg
Target Version 1.5 Page 10
Switch: -LT -EQ -GT
Meaning: specify a file size range
Description: These switches allow you to search only for files within a
certain size range. Some examples:
Target *.PAS -LT1024
would display all .PAS files that have a size smaller than
1024 bytes.
Target *.* -EQ0
would display all files that have a length of zero.
Target *.* -GT500000
would display all files that are larger than 500,000 bytes.
Target *.* -GT1023 -LT2049
would display all files that are from 1,024 to 2,048
bytes in size, inclusive.
Switch: -S -B
Meaning: specify a file date range
Description: These switches allow you to search only for files within a
certain date range. These switches are the "since" (S)
switch and the "before" (B) switch. Both switches come in
two flavors; you can specify the date in number of days
(eg: -S5) or with a full date (eg: -S8-19-89). If you
specify either switch with no date specifier, then it defaults
to '0 days'. These date specifiers are also used when looking
inside of archive files. Some examples:
Target *.PAS -S5
would display all .PAS files that have a date greater than or
equal to 5 days ago (in other words, modified SINCE 5 days ago).
Target *.PAS -S5-1-89
would display all .PAS files modified SINCE 5/1/89.
Target *.PAS -B5
would display all .PAS files modified BEFORE 5 days ago.
Target *.PAS -B5-1-89
Target Version 1.5 Page 11
would display all .PAS files modified BEFORE 5/1/89.
Target *.PAS -S5-1-89 -B6-1-89
would display all .PAS files modified between the dates of
5-1-89 and 5-31-89.
Target *.PAS -S
would display all .PAS files that have been modified today
(defaults to '-S0').
Switch: -Z
Meaning: show only files with their archive bit set
Description: The '-Z' switch allows you to display only those files which
have their "archive bit" set on. In other words, it will show
all files that have been modified since your last backup (if
your backup program clears the archive bit, that is).
Switch: -HIDDEN
Meaning: also show hidden and system files
Description: The '-hidden' switch allows you to also display those files
which are "system" and "hidden" files.
FILE MANIPULATION FACILITIES
Switch: -C"command to execute"
-CV"command to execute"
-O"command to display"
Meaning: Execute (or display) a DOS command or application program
on all files found.
Description: This switch tells Target to execute the command or program
within the double quotes on each matching file found. If the
referenced program is not a DOS command, then it must be
found in the system PATH.
Target provides access to replaceable parameters that
can pass the full filename, the pathname only, the filename
only, or the name of the archive member (if you're searching
archives) to the command or program.
When you use the -cv switch, it operates identically to the
-c switch, except that Target will ask you for confirmation
before it actually executes the command.
Target Version 1.5 Page 12
The -o switch prints the command it WOULD have executed to
the screen. You may use this as a test before doing the
-c command to make sure that what you think you told Target
to do is the same as what you DID tell it to do. A more
important use of the -o command is to redirect all of the
Target output into a batch file that you can execute later.
Replacement parameters for the DOS command or program being
executed for both -c and -o are as follows:
Parm Desc Normal example Archive example
---- ---- ----------------- -----------------
&f full file name c:\dos\xcopy.exe c:\dos\comlib.zip
&p path name only c:\dos\ c:\dos\
&d directory name c:\dos c:\dos
&n file name only xcopy.exe comlib.zip
&m archive member <blank> xcopy.exe
&r root of the name xcopy xcopy
&& the '&' char
EXAMPLES:
1) You have many .DOC files straying all over your hard drive,
and you'd like to incorporate them all into one simple
ZIP file. You could do this with the following command:
C:> Target -d *.doc -c"pkzip -m c:\docs.zip &f"
2) You want to make a copy of all of your Pascal source code
that has been changed today so that you can take it home
with you:
C:> Target -d *.pas -s0 -c"copy &f a:\"
3) You want to get a text file listing of every directory
name on your hard drive(s) in the file HARDRIVE.DAT:
C:> Target -d nul -o"&p" >c:\Hardrive.Dat
4) You want to delete every .BAK file on your system (even
those that are in ZIP files). This would be a 2-step
process:
First, delete the normal .BAK files
C:> Target *.bak -v -n
Then, delete them from the archive files
C:> Target -d -ao -zip *.bak -c"pkzip -d &f &m"
Target Version 1.5 Page 13
Switch: -V [-N]
Meaning: do a verified delete of any matching files found
Description: These switches tell Target to delete any matching files found.
If you specify only the '-V' switch, then Target will prompt
you before it deletes each file. If you specify BOTH the '-V'
and the '-N' switch, then Target --WILL NOT-- prompt you.
Example:
Target *.bak -v
Switch: -SCAN
Meaning: Perform a virus scan on any matching files
Description: The McAfee Associates' SCAN program must be in the system
PATH to use this function.
The Target and Target_DRIVES Environment Variables
When Target begins execution, it searches the environment for a variable
named Target. If this variable is present, its contents will be appended
onto the command line just as if you had entered them in from the keyboard.
This option is very handy for setting "default options" that you'd like for
Target to perform every time. Simply set the Target variable in your
AUTOEXEC.BAT file. For example, if you'd like to always (a) page break
when the screen fills up, (b) display the filenames on the right of the
screen, and (c) display output in upper case, you would put the following in
your AUTOEXEC.BAT file:
SET Target=-P -R -U
Target would then use these options every time you executed the program.
If you specify the "-d" switch (search all drives), then Target will
search the environment looking for a variable named Target_DRIVES. If this
variable is found, Target will use this list as the definition of the
drives to search. If the Target_DRIVES variable does not exist, Target will
use its own list, which defaults to drives c: through z: (ie: cde...z).
The Target_DRIVES variable is needed mainly by people using networks.
Target's reckless abandon of simply searching all drive letters caused
some network users a lot of headaches. It seems that those affected the
most were users of Novell networks. On Novell, you can specify many
Target Version 1.5 Page 14
different drive letters for the same "volume" (ie: partition), so Target
would show the same physical file many times, since Target thought that
it was really on a different drive. With the Target_DRIVES variable, it is
up to the user to tell Target what drives are physically different. For
example, let's assume that you have 3 volumes defined, and the drive letter
assignments are as follows:
Volume 1 - drives C: and D:
Volume 2 - drives E: and F:
Volume 3 - drives G: and H:
For Target to work correctly, you would put the following line in your
AUTOEXEC.BAT file:
Set Target_DRIVES=CEG
or
Set TA_DRIVES=CEG
(Target will accept TA_DRIVES for the drive searching environment
variable in place of Target_Drives).
Now, when you search using the "-d" switch, Target won't list duplicate
filenames. If the Target_DRIVES Environment Variable exists, it is used
every time. If you need to search a different list, you must specify a
drive list with the filename instead of using the "-d" switch. For
example, "Target cdfg:*.bat".
Upper and lower case is not significant in the names of the environment
variables. NOTE that no colon is used in the Target_DRIVES environment
variable; only the drive letters are listed.
Target Version 1.5 Page 15
REGISTRATION
A registration fee of $20.00US is required for the use of
TARGET by individual home users. Registration is for one year
and entitles the holder to unlimited free upgrades off of McAfee
Associates' BBS or CompuServe GO MCAFEE. When registering, a
diskette containing the latest version may be requested. Add
$9.00US for diskette mailings. Only one diskette mailing will
be made.
Registration is for home users only and does not apply to
businesses, corporations, organizations, government agencies, or
schools, who must obtain a license for use. Contact McAfee
Associates for more information.
Outside of the United States, registration and support may be
obtained from the Agents listed in the accompanying AGENTS.TXT
file.
TECH SUPPORT
For fast and accurate help, please have the following
information prepared when you contact McAfee Associates:
- Program name and version number.
- Type and brand of computer, hard disk, plus any
peripherals.
- Version of DOS you are running, plus any TSRs or device
drivers in use.
- Printouts of your AUTOEXEC.BAT and CONFIG.SYS files.
- The exact problem you are having. Please be as specific
as possible. Having a printout of the screen and/or
being at your computer will help also.
McAfee Associates can be contacted by CompuServe Forum, BBS, fax, or
InterNet 24 hours a day, or call our business office at (408) 988-3832,
Monday through Friday, 7:00AM to 5:00PM Pacific Standard Time.
McAfee Associates (408) 988-3832 office
3350 Scott Blvd., Bldg. 14 (408) 970-9727 fax
Santa Clara, CA 95054-3107 (408) 988-4004 BBS (32 lines)
U.S.A USR HST/v.32/v.42bis/MNP1-5
CompuServe GO MCAFEE
Internet mcafee@netcom.com
If you are overseas, please refer to the AGENTS.TXT file for
a listing of McAfee Associates Agents for support or sales.
Target Version 1.5 Page 16
AUTHENTICITY
Target is packaged with the VALIDATE program to ensure the
integrity of the TARGET.EXE file. The VALIDATE.DOC file tells how
to use VALIDATE. VALIDATE can be used to check subsequent versions
of Target for tampering.
The validation results for Version 1.5 should be:
FILE NAME: TARGET.EXE
SIZE: 65,428
DATE: 07-21-1992
FILE AUTHENTICATION
Check Method 1: 9DD7
Check Method 2: 0499
If your copy of Target differs, it may have been damaged. Always
obtain your copy of Target from a known source. Valid copies can
be obtained from McAfee Associates' bulletin board system at
(408) 988-4004 or from GO MCAFEE on CompuServe.
All of McAfee Associates programs are archived with PKWare's
PKZIP Authentic File Verification. If you do not see an "-AV" after
every file is unzipped and receive the "Authentic Files Verified! # NWN405
Zip Source: McAFEE ASSOCIATES" message when you unzip the files
then do not use them. If your version of PKUNZIP does not have
verification ability, then this message may not be displayed.
Please contact us if you believe tampering has occurred to the
.ZIP file.
Target Version 1.5 Page 17
HISTORY
Target is the newest version of SST - originally written by
Keith Ledbetter. McAfee Associates acquired all of Keith's
programs in June of 1992. Keith has done a remarkable job and it
was very difficult to improve on his work. The current version of
Target adds the ability to SCAN for viruses, and relaxes the syntax
requirements somewhat. For example:
Target C: D: E: *.BAK
Target CD: E:*.BAK
Target CDE: *.BAK
Target CDE:*.BAK
all would be treated as identical. The original WHEREIS and SST
require the - CDE:*.BAK - to be the only legitimate syntax.
In addition, we have changed the program to default to pause at a
page break. The -p is now required to not pause.
Other than this, we could find nothing to change that would improve
Keith's wonderful program.