|
Processing Lines
|
|
|
The most powerful method of processing lines involves getting
the name of a batch file on the beginning of the line. This allows the
words to be passed as arguments to the batch file.
Creating Line Fragments Lines without the
usual carriage-return on the end ("line fragments") can have your data
lines appended to them to create batch files.
-
Manual Creation Manually create a line fragment
ahead of time and copy it as needed.
-
QBASIC Create your fragment by having your batch
program make and run a BASIC program using the simple PRINT statement.
-
DEBUG Easily invoked by a batch program, DEBUG
can be used as a simple binary editor to create any desired fragment.
-
MODE Taking advantage of a quirk of this
Windows 95 command is the quickest way to create a line fragment.
Capturing DOS Prompts
Since the prompt always appears at the beginning of a line, capturing an
intact line -- with a custom prompt you define -- can be used to turn a
line of data into a batch file.
Error Messages and Prompts
Several DOS commands will place your data on the same line with some kind
of message. If the message precedes your data, you can turn the line into
a batch file. In addition to the widely-known DATE, six other commands
are analyzed.
FOR Unlike the
other methods, it doesn't turn your line of data into a batch file. But
FOR does the actual job of separating the words in the line. If the words
on the line happen to be file masks, FOR is the best choice.
Isolating a Line Sometimes the problem is
that you have lots of lines and only want one.
-
FIND If your line is at all unique, it can be
separated from the junk.
-
Numbering lines. Both FIND and FC can place
unique sequential numbers at the beginning of each line of data in a file.
This makes every line unique.
Lost? Look at the site map.
Bad links? Questions? Send me mail.