| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Few batch files needed... |
Jani Saksa wrote in a message to All:
JS> I need help from some guru!
JS> There is 3 different batches that I would need:
JS> 1) Delete all files that certain name...
JS> Could be used like this:
JS> DELALL kot*doc.?E2
See the docs for delete/erase and wild cards.
JS> 2) Change certain piece of text from all selected files to
JS> something else. For example, change every "&" to
"&"
JS> from all HTML files in directory like this:
JS> CHANGE *.html "&" "&"
Do you have SED, a stream editor? If not, get it and I'll show you how to
easily do this. There are other apps around that do search and replace
like this also, such as REPL.ZIP. I use sed for this type of thing though.
Often, if you don't have many files, or need to repeat it often, it's
better and easiser to do with a text editor's search and replace routine,
that way, you can see what you are changing, and are less prone to errors
(replacing things you didn't mean to replace.)
JS> 3) Compile a list of reviews!
JS> I have a list file like this:
JS>
JS> Twilight Warrior
JS> DooM 2
JS> SP
JS> 10 levels
JS> *****
JS> UAC
JS> DooM 2
JS> SP
JS> 1 level
JS> ***
JS>
This can easily be done with REXX or AWK or GAWK. SED and AWK are
freeware, REXX comes with OS/2. If the stuff you want is all identical,
and seperated with a blank line or something identifiable, it is easy. Is
that the case?
IE, each table row has exactly 4 items, and each row is seperated by a
blank line, or something else identifiable? "****" are a lousy
seperator though, as they are special characters and can be problematic
protecting them from the shell.
Jack
--- timEd/2-B11
* Origin: Jack's Free Lunch 4OS2 USR 56k Pgh Pa (412)492-0822 (1:129/171)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 635/444 506 728 639/252 @PATH: 129/171 3 11 270/101 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.