home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1986
/
19
/
change.doc
< prev
Wrap
Text File
|
1987-07-30
|
2KB
|
49 lines
CHANGE Michael J. Mefford
Command 1986/No. 19
______________________________________________________
Purpose: Performs a rapid search-and-replace operation
for text strings and/or ASCII decimal codes
throughout a file of maximum 40,000-byte
length.
Format: CHANGE filespec findstring replacestring
Remarks: The filespec parameter may include a drive
letter and a path in addition to the
designated filename.
Findstring and replacestring may consist of
text characters enclosed within (double)
quote marks or ASCII decimal codes whose
numbers are separated by commas. Note that
the format requires that each parameter be
separated by a single space. Text strings in
quotes and ASCII values in numerals may be
combined in either string if separated by
commas.
Example: To change all references to Miss Jones to
Mrs. Smith in the file NOGOSSIP.ART on the
current directory, you would enter
CHANGE NOGOSSIP.ART "Miss Jones" "Mrs. Smith"
Example: To strip out all carriage return-line feeds
(i.e. replace them with a null string) in the
file MCI.B16 in the \COMM subdirectory, enter
CHANGE \COMM\MCI.B16 13,10 ""
Notes:
1. In the second example you might want to
use a space between the quote marks
rather than a null string to keep the
words from running together. Observe
that by putting the number of the month
in hexadecimal (B=November) you can fit
both month and day within the three-
character DOS filename extension.