home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
VGO10.ZIP
/
GO.DOC
< prev
next >
Wrap
Text File
|
1993-11-14
|
34KB
|
581 lines
Oh, no! NOT ANOTHER README FILE!
GO.CMD Copyright (c)1993 by M.O.S.E.S./Kari Jackson. All rights reserved.
Midlands OS/2 Enhancement Society
Bart Toulouse and Kari Jackson
November 14, 1993
System requirements
OS/2 2.1. (We have no reason to suspect that it would not work
with 2.0, but it's never been tested that way since we
couldn't get anyone to reinstall it just to test this
program for us.)
REXX support installed.
Instructions
In addition to this GO.DOC file, GO.CMD incorporates an online
help feature. From the commandline, simply type "GO /?" or just
"GO" with nothing after it to see the instructions for syntax and
usage. Of course, if you go this route instead of reading this
file, and then you get into trouble, it won't be our fault!
Installing GO
After you've unzipped the file, you have two options to max-
imize the utility of GO. Either put the GO.CMD file into an
existing directory that is already in your path variable, or
create a directory, edit the path variable in your CONFIG.SYS
file to include that directory, move GO.CMD there, and reboot
your computer. That's about it!
GO.CMD's Purpose and Usage
This program is a commandline-based front end which works with
commonly used commands like DEL, COPY, and others to help you
manage files more effectively. It allows you to work with just
the files that match a particular set of sizes, dates, and/or
attributes. One of the really neat features of this utility is
it allows you to manipulate files in locations very far-removed
from where you happen to be. For instance, let's say you were
located in a directory called C:\TOP\SUB\SUBSUB, and you suddenly
wanted to edit a file called "LETTER", which happened to be in
D:\BOTTOM\SUB\SUBSUB. With GO, all you'd have to type would be
"GO EDIT LET" rather than "EDIT D:\BOTTOM\SUB\SUBSUB\LETTER". GO
and your editor will do the rest. (Of course this is assuming
your editor's name is EDIT!) By default (if you take no action
to limit the search), GO will look at every directory on every
drive beyond B: (including CD-ROM drives, if a data disk is
present). If you don't want to look at every hard drive you
have, GO supports several limits to scope. You can limit the
search to a specific drive, or just a specific directory, with or
without its subdirectories, or you can tell GO to skip a certain
drive or drives. You can even tell GO to search A: and B: as
well if you so desire. Read the "Command Syntax" section to find
out how to do these things.
When GO.CMD is done searching for all the files that fit the
specifications you've asked for, it shows you the filenames (one
screenful at a time) along with a list of your options. You can
choose all the files, or some of the files, or none of the files,
or you can choose all the files except a chosen few. Then GO.CMD
will execute DEL, COPY, EDIT, or whatever command you'd typed,
once for each and every filename you've selected (unless you've
used the /1 switch to tell GO to execute one long command instead
of one command for each selected filename).
Here's what the display of the filenames will look like:
1. 09/26/93 29998 ----- E:\util\GO.CMD
2. 09/26/93 35360 A---- E:\util\source\GO.SRC
3. 09/26/93 24639 ---R- E:\util\source\go.doc
4. 09/24/93 129624 ----- E:\vgo\VGO.EXE
5. 09/26/93 3148 ----- E:\vgo\vgo.olh
The only part that's not self-explanatory is the part between the
sizes and the filenames. That is the attributes display. In the
example above, the first file has no attributes, the second file
has an Archive attribute, and the third file has a Read-only
attribute. Every file has five possible attributes. (Six,
actually, but REXX ignores the Volume attribute.) The five are
Archive, Directory, Hidden, Read-only, and System. The five
places in the attributes display represent those five attributes,
and they're in alphabetical order. If a file had all five
attributes (which would be rather difficult since directories
never have Archive attributes), its attribute display above would
say ADHRS. --H-S would be a Hidden System file. Etc. You'll
never see a D in column two of GO's attributes display, since GO
doesn't show you any directory names.
Here's what you'll see below the filenames GO finds for you:
Type ALL to select all of these files.
Type <Enter> to select none of these files.
Type 1 14 23 38 to select some of these files.
Type 14 - 23 to select a range of files.
Type - 1 14 23 38 to exclude some of these files.
Type - 14 - 23 to exclude a range of files.
Type SKIP to skip the rest of the search.
Type QUIT to abort this entire operation.
1 14 23 38 means that's what you type if you want to select the
files that are displayed on the screen next to those four
numbers. If you want only file #7, then you type just 7. If you
want files 12 and 27, you type 12 27. The numbers in that
display are only examples to remind you what options you have.
They're not to be taken literally. And SKIP means that you don't
want any of the files on this page and you don't want to continue
the search; you just want to go ahead and execute your command
with whatever files you had already chosen on previous pages.
All of these options apply only to the files displayed on this
particular page. For example typing "ALL" chooses all the
filenames you see displayed at the moment, but has no effect on
earlier or later pages of filenames. QUIT exits the GO.CMD
operation without executing any commands at all.
As an example, if you were to execute the command
GO EPM .DOC
then GO would search all of your drives, C: and higher, for *.DOC
files. Then it would show you a list of those files, followed by
those eight lines of stuff we talked about already, that start
like this:
Type ALL to select all of these files.
Type <Enter> to select none of these files.
[Etc.]
Now if you picked the files named C:\ONE.DOC, D:\UTIL\THREE.DOC,
and E:\DIRNAME\SUBDIR\SEVEN.DOC, then GO would pass the following
commands to the operating system, one right after the other:
EPM C:\ONE.DOC
EPM D:\UTIL\THREE.DOC
EPM E:\DIRNAME\SUBDIR\SEVEN.DOC
Or if your editor supports more than one filename on its command-
line, you could use GO's /1 (that's a "one") switch to tell GO to
execute just one long command:
EPM C:\ONE.DOC D:\UTIL\THREE.DOC E:\DIRNAME\SUBDIR\SEVEN.DOC
instead, if you like. There are quite a few commandline switches
you can use to tell GO.CMD to act a bit differently. Read about
them under the "Command Syntax" heading.
HPFS and Long Filenames
GO will work with the long filenames with spaces in them, which
HPFS supports. However, these long filenames must be surrounded
by quotation marks ("Long, complicated filename"), just like when
they are used in other commandline situations.
Switch Characters
You can use - in place of / for any switches, as you prefer.
Just one thing though---the /CH and /CT switches generally come
in pairs. The pairs absolutely must match each other! You can't
use /CT with -CT, or vice versa. The program won't work if you
do. Also, the letters in switches can be uppercase or lowercase.
It won't make a bit of difference to GO. /D and /d are exactly
the same as far as GO can tell. Again, the exception to that is
the /CT and /CH switches. You can't use /CT with /ct, or /ch
with /CH.
Disclaimer
While this Program has been thoroughly reviewed and tested, it is
provided solely "as is" and without warranty of any kind.
M.O.S.E.S., Kari Jackson, and Bart Toulouse specifically disclaim
all warranties, expressed or implied, including but not limited
to implied warranties of merchantability and fitness for a
particular purpose with respect to defects in any portion of the
package. In no event shall M.O.S.E.S., Kari Jackson, or Bart
Toulouse be liable for any loss of profit or any other damage,
including but not limited to special, incidental, commercial,
consequential or other damages of any kind resulting from defects
in this software or its documentation. USE THIS PROGRAM AT YOUR
OWN RISK.
Shareware
This Program is shareware, not freeware. What that means is
this: It may be freely distributed to anyone as long as all of
its files and documentation are distributed together. It may be
freely used for evaluation purposes, to decide whether you like
it. If you do like it and want to continue using it, you are
supposed to register it. We will not have you arrested or sue
you if you don't, but you should feel guilty about it if you have
a conscience. Using someone else's work without their permission
is against the law, and we do not give you permission to use
GO.CMD longer than necessary for evaluation purposes (like about
a month) unless you register it.
To register GO.CMD alone (meaning you do not want to also use
VGO, the graphical version), just send $5 to Kari Jackson
3201 Monroe Street
Omaha NE 68107-4048
Registering VGO (the graphical version) automatically entitles
you to use GO as well, so you need not register GO separately if
you register VGO.
Sorry, we won't send you a registered copy of the program since
the shareware version just does not have one single disabled
feature, so there's no reason to. <grin>
Command Syntax
This is the COMPLETE syntax. If you want a brief overview just
to remind yourself of something, type GO /? for the online help.
GO [command] [filespec] [switches]
GO is the word that causes OS/2 to execute GO.CMD. If GO.CMD is
in a directory on your PATH, then you can execute it from
whatever directory you happen to be in. If you want to rename it
to something else, like, well, STOP.CMD for all we care, that
would be fine, and you'd just type STOP everywhere that the
instructions tell you to type GO.
[command] is the command you want GO to execute for you. It can
be pretty much any command that takes a filename as a parameter!
Likely candidates include: DIR, COPY, REN, E(ditor), VIEW, (need
we go on?). The command can be located anywhere on your system,
so long as the directory it's in is included in the PATH
variable, or the command is internal or in the current directory,
or you specify its pathname on the commandline. Just like any
other command you try to execute. Because all GO is going to do
is pass the command to the commandline after you've chosen the
filenames to execute it with. So the command is going to be
executed the same way as if you were executing it without using
GO at all---according to the rules your operating system uses for
finding the executable code for any command you try to execute.
NOTE: [command] has to be the first thing on the commandline
after the word "GO". The position of the rest of the stuff on
the commandline doesn't much matter as far as GO.CMD is
concerned, but the [command] simply must be first.
[filespec] is the filename or file specification you want GO to
find for you. If you don't specify any filename, GO will assume
that you mean *.* which stands for all files, regardless of name
or extension. If your specification does not contain a period or
an asterisk, GO will append *.* to the end of it---so if you tell
GO to search for LET it will search for LET*.* without making you
type the asterisks. If your specification starts with a period,
GO will prepend * to it----so if you tell it to find .INI it will
actually search for *.INI without making you type the asterisk.
And your filespec cannot contain a \, which means it can't
contain directory name information. One of the main reasons for
GO is so that you can do things without specifying the location
of a file you want to work with. (Of course if you do want to
limit the search to a particular directory, you can use the /D
switch.) Other than those few differences, the filespec is
specified in GO the same way it would be in any other commandline
utility, using wildcards, or whatever.
Passing parameters to the [command]
GO.CMD needs to have some way of knowing whether a /S you type on
its commandline is supposed to be its own /S switch, or whether
you want that /S to belong to the [command]. So if the command
you want to execute wants any parameters other than the name of
the file you want it to work with, then you'll need to use
GO.CMD's /CH and/or /CT switches to pass those parameters to the
command. /CH stands for Command Head, and /CT stands for Command
Tail. Anything that should go on the command's commandline
before the filename, would be part of the Command Head, and
anything that should go on the command's commandline after the
filename, would be part of the Command Tail.
For example, when you want to turn on a file's Read-only
attribute, you do that by saying ATTRIB +R FILENAME.EXT. So if
you are using GO.CMD to do that, the "+R" would be considered to
be the Command Head since it goes between the command and the
filename.
So in order to get GO.CMD to ignore the +R, and not try to
interpret it, and just pass it straight through to the ATTRIB
command, you have to surround the +R on your commandline with
/CH switches. Like this:
GO ATTRIB /CH +R /CH *.*
Or when you want to copy a file to your B: drive and use the COPY
command's /V switch, you do it by saying COPY FILENAME.EXT B: /V.
So with GO, since the "B: /V" comes after the filename on the
COPY command's commandline, that means you want it to be the
Command Tail.
So in order to get GO.CMD to ignore the B: /V and just pass it to
the COPY command, you surround it with /CT switches like this:
GO COPY /CT B: /V /CT *.*
If your /CH stuff or your /CT stuff is the last thing you're
putting on GO.CMD's commandline, then you can leave off the
second /CH or /CT switch. For example,
GO ATTRIB *.* /CH +R
GO COPY *.* /CT B: /V
So after GO.CMD has done its job of finding the files you might
want to work with and letting you choose exactly which of those
are the ones you wanted, it passes the following information to
the operating system's commandline for execution, one time for
each filename you chose:
[command] [command head] [filename] [command tail]
GO.CMD will attempt to interpret everything that's not surrounded
by /CH or /CT switches (with the exception that if a /CH or /CT
string is at the end of the commandline, it need only be started
by /CH or /CT, not surrounded by them). So everything on your
commandline that is surrounded by /CH or /CT switches must be
something that your [command] can understand, and everything that
isn't surrounded by /CH or /CT switches must be something that
GO.CMD can understand---which means any of the following:
GO.CMD's own switches
/A Attributes /A+A+R+S+H-A-R-S-H*A*R*S*H
This switch allows you to specify which files GO will act on, by
file attributes. It must be used with at least one of the
additional parameters listed above. It can be used with as many
of its additional parameters as you want as long as what you're
trying to specify makes sense. (Actually the program isn't going
to check to see whether it makes sense or not---that's up to
you.) If you use a plus, that means you're ONLY looking for
files that do have that attribute turned on. If you use a minus,
that means you're ONLY looking for files that do not have it
turned on. If you want GO to look for both files that do and
files that don't have a particular attribute, you use the *
modifier instead of a + or -. (There's not much point in ever
specifying *A, -R, -S, or -H here, since those are the defaults.
But GO.CMD will accept them if you get carried away and type
them. So you don't have to work hard to remember that it would
not make sense to use them.)
EXAMPLES: /A-A+R would look for just the files that have no
Archive attribute, do have the Read-only attribute, and do not
have the Hidden or System attributes (since -H and -S are
defaults and /A-A+R doesn't tell GO anything different, in
relation to H and S attributes). /A+R+H would search only for
files that have R and H attributes, and do not have S attributes
and may or may not have A attributes (since -S and *A are the
defaults and /A+R+H doesn't say otherwise, in relation to S and A
attributes). /A*R*H*S means all files, period, since the default
already includes *A files. /A-A*R*S*H would mean every file on
your entire system that has its Archive attribute turned off,
including Hidden, System, and Read-only ones.
NOTE: Commands which won't work on files with special attributes
(like COPY on +H files) will not suddenly start working when used
with GO either. If you use the /A+H switch to tell GO to only
show you hidden files, and then pass one of them to the COPY
command, the only thing COPY is going to do is say "File not
found" just as it would if you executed COPY without GO, with a
hidden file's name as the source file. The exception to this
paragraph is the DEL or ERASE command. Because when [command] is
DEL or ERASE, GO will remove any H, S, and/or R attributes from
files before passing the DEL or ERASE commands to the operating
system, for your convenience.
/E and /L Earlier and Later /E071093
or /L-25
Limits the search to files updated on or earlier than (for /E) or
on or later than (for /L) the date specified. If you don't use /
or - to separate the month, day, and year of the date, then they
must each be two digits long. But if you use / or -, then you
need not use both digits for months or days less than ten. For
example, 9/5/93 is fine; 9-28-93 is fine; but 92893 is not.
Regardless of whether you use / or - or not, you must always
specify the month first, then the day, and then the year.
If you use /E and /L together, and the dates you use on both of
them are the same, as in /E9-27-93 /L9-27-93, then GO will show
you just the files that have that exact date. Or if you use both
/E and /L and the date on the /E switch is the later of the two
dates, then you'll get a display of just the files that were last
updated on or between those two dates. (You cannot specify a
later date on the /L switch than that on the /E switch, though.
That wouldn't make sense, so GO.CMD doesn't allow it.)
Another way to use the /E and /L switches is to specify a number
of days prior to the current date (or the date your system thinks
is the current date, anyway). To use this option, use the minus
symbol (-) and a number after the /E or /L switch. Thusly, /E-10
would only look at files from 10 or more days earlier than the
current system date. The range of this number with the /L switch
is from -0 (specifies current system date) to -365 (one year
prior to the current system date). While this range also applies
to the /E switch, using /E with -0 is pointless since it would
mean the same thing as not using any /E switch. It is useful
with -1 to -365 though. Since we in Omaha have a correct-date
fetish, we don't know for sure what would happen if you had your
system date set to somewhere in the past, so that you'd have
files with dates later than what your system thought was the
current date. And we didn't build support for a plus feature
into the program, also because of our correct-date fetish. If
your system date is current, then there are no such files as +2
or +365 or plus anything else.
NOTE: In all cases, the minus option is relative to the system
date only. Never anything else. It has been brought to our
attention that a user might think that /E7-25-93 /L-10 would mean
files earlier than 7/25/93 and later than 10 days before that.
No, that's not what it means. It would mean files earlier than
7/25/93 and later than 10 days earlier than the system date.
/LT and /GT Less Than and Greater Than /LT1048576
or /LT1024K
or /LT1M
Limits the search to files that are Less Than or equal to a cer-
tain size, or Greater Than or equal to a certain size. The num-
ber refers to the number of bytes of data in the file. It is the
same as the number you see in the size column of a DIR command's
output. Or if you'd like to specify the number of kilobytes in-
stead of the number of bytes, say #K. Or #M for the number of
megabytes. Therefore /LT1048576, /LT1024K, and /LT1M are all
exactly identical to each other in meaning. (That's right, in
case you don't know it, a kilobyte is 1024 bytes, not 1000 bytes.
And a megabyte is 1024 kilobytes, not 1000 kilobytes. Computers
work with powers of two, not ten. So the prefixes kilo- and
mega- do not have their normal meanings when used in computer
terms.)
If you use /LT and /GT together, and the sizes you use on both of
them are the same, as in /LT2048 /GT2048, then GO will show you
just the files that have that exact size. Or if you use both /LT
and /GT, and the size on the /LT switch is the larger of the two,
then you'll get a display of just the files that are one or the
other of those two sizes or anything in between. (You cannot
specify a larger size on the /GT switch than that on the /LT
switch, though. That wouldn't make sense, so GO.CMD doesn't
allow it.)
/D Directory
Limits the search to the current directory, rather than the
default of every directory on every available non-floppy drive.
/DS Directory and Subdirectories
This is just like the /D switch only it also includes files in
directories underneath the current one.
/O search specified drive Only /OE
Limits the search to a specific drive only. Can be any drive on
your system. When used, GO searches all of that drive and none
of any other drives. The example above would tell GO to search
the E: drive only.
/X eXclude drive(s) /XEH
This switch allows you to tell GO to ignore certain drives. The
example above says that you don't want GO to search the E: or H:
drives. /XE would tell GO to just ignore the E: drive. Etc.
/F Floppies
This switch tells GO to search the A: and B: drives (if they have
disks in them) as well as C: and higher (which is the default).
/C Change directory
This switch lets you tell GO to change to the directory that
contains each filename before executing [command] with each file
you had selected. This is especially useful when you want GO to
find and execute some command you don't remember the location of.
You would use START as the [command], and the first few letters
of the command you want to execute as the [filespec], and use the
/C switch so that the command will be able to execute once GO has
helped you find it---since there are so many commands that can
only work while you're in their own directory.
/N No full filespec
This switch lets you tell GO to pass just the filename (as in
FILENAME.EXT) rather than the full file specification (as in
C:\DIRNAME\FILENAME.EXT) as it usually does. Because some
programs don't understand pathname information. Obviously you
need to be in the directory that contains the file when you
execute a command this way, but GO.CMD always assumes the /C
switch when you use the /N switch, so you don't have to specify
it yourself.
/P Pause
This switch is for control freaks. It gives you a chance to
monitor your command step by step. Between single executions of
your [command], you'll receive a "Press any key when ready"
prompt. If things don't appear to be going your way, you can use
Ctrl-C to abort the run. Or if for any other reason you want GO
to pause after executing [command] with one selected filename and
before going on to the next, then /P is the switch you use to
make it do that. (Of course you can use Ctrl-C to break out of
execution even if you haven't used the /P switch. It's just that
if you use /P, you'll be able to get out sooner!)
And by the way, don't think it strange if you receive a message
that says:
"REX0004: Error 4 running GO.CMD, line 1: Program interrupted"
if you do use Ctrl-C to break out of the program. If you inter-
rupt the program, it is not abnormal for the program to tell you
that it got interrupted.
/S START command
If [command] is something that takes more than just a second, and
you want [command] to be executed with all of your chosen files
all at once in separate sessions, rather than one after the other
in the same session, then you want to use the /S switch which
will make GO execute START /C [command] rather than just
[command], with each selected filename. Just understand that if
you tell GO to use the /S switch and then select twenty different
filenames, GO is going to attempt to start up twenty different
sessions! Don't do that unless your hardware has enough power.
/Y Yes, select all the matching files without asking
This switch will make GO skip the whole section of the program
that makes it display the filenames and allow you to select the
ones you want to work with. It just automatically executes the
[command] against all the files that match your specifications,
without asking you. Use it with caution only in situations
where you're sure that you do want the [command] to be performed
on every single matching file that GO could possibly find. When
the /Y switch is used, GO will not display the Copyright notice
or say "Searching....please wait" as it usually does, because the
main purpose of the /Y switch is for batch files and you may want
your batch files to leave the screen blank.
/1 One long command
Ordinarily, GO executes your [command] once for each filename you
select, with only one filename on each commandline. If you have
a command that allows more than one filename on its commandline,
you might want to use the /1 switch. The command:
GO EDIT *.TXT
would execute these commands for you:
EDIT C:\ONE.TXT
EDIT D:\UTIL\TWO.TXT
EDIT E:\DIRNAME\SUBDIR\THREE.TXT
if those were the three files you selected. But the command:
GO EDIT *.TXT /1
would execute just this one long command:
EDIT C:\ONE.TXT D:\UTIL\TWO.TXT E:\DIRNAME\SUBDIR\THREE.TXT
NOTE: When using the /1 switch, it is possible to exceed OS/2's
commandline length limit! When you execute a command that's
longer than what your operating system can see, it only sees the
first part of it. In some cases, this can cause BIG problems!
So be careful with the /1 switch, when selecting a very large
number of files. And of course, if you're using GO to execute
a DOS program, it is VERY easy to run into DOS's commandline
length limit (which is 127 characters, including more than
twenty characters that OS/2 for some reason sends to the DOS
session itself, so that leaves you with only around a hundred
characters that you can use).
And if you use the /N switch to keep the command short even while
selecting a lot of filenames, remember that it will only work if
all of the files are in the SAME directory.
The GO-OP Environment Variable
If you find yourself using the same GO switches nearly every time
you use GO, create an environment variable named GO-OP (for GO
OPtions) and put those switches there. For example, if you
almost always leave a data disk in your CD-ROM drive but you
almost always want GO to avoid searching it, you can put the
command SET GO-OP=/XF (that's assuming your CD-ROM's drive
letter is F:) into your CONFIG.SYS file (and reboot, of course).
Then every time you run GO, it will act like you had typed /XF
right on the commandline. SET GO-OP=/XF /1 in CONFIG.SYS would
cause GO to act like you'd typed /XF /1 on the commandline,
every time, without you ever typing /XF /1 again. Etc.
Anything you type on the commandline will just be added to what-
ever your GO-OP environment variable says. For example if GO-OP
is /XF /1 and you type GO EDIT /S /P then GO will think that you
had typed GO EDIT /XF /1 /S /P on the commandline instead.
Now assuming that GO-OP still says /XF /1 and you want to make
GO act like you had NOT used the /1 switch, how would you do
that? Easy. Add /-1 to your commandline. Anything that starts
with /- or -- tells GO to ignore the corresponding switch on the
GO-OP variable. /-X would make GO ignore the /XF on GO-OP. /-P
would make GO ignore a /P on the GO-OP variable. /-O would make
GO ignore a /OC switch on GO-OP. Etc.
How about switches that have data attached to them? What if you
want to make GO use the same switch but with different data than
what appears on the GO-OP variable? Well, if GO-OP has /XF in
it, and you used /XD on GO's commandline, then D: would be the
only drive excluded from GO's search. The /XD on the command-
line REPLACES the /XF that GO sees on the GO-OP variable. If
you want GO to keep excluding F: but also exclude D:, then you
must use /XDF or /XFD on the commandline.
Basically the GO-OP variable is used and overridden in exactly
the same ways as DOS 5.0's DIRCMD variable.
You may use any of GO's switches on the GO-OP variable except
/CH and /CT.
And of course like any other environment variable, you can
change it by simply issuing another SET command, rather than
editing CONFIG.SYS and rebooting. However, when you do that,
the change is made ONLY to the environment in that commandline
session and any session started from that one. Not in any other
sessions you have open or any sessions that you start from some-
where else. If you want an environment change to affect all of
your commandline sessions, then editing CONFIG.SYS and rebooting
is the only way.