Short: replaces AREA: fields in FIDO-PKTs Author: marc_albrecht@act.psycho.de Uploader: root Type: comm/fido Version: 1.0 Long: FZ_RM replaces AREA: fields in FTS-1 style packed messages. You need this for Foozle (eg) to replace the (longer) NewsGroup names with (short) Foozle usable names. E.G.: Foozle cannot handle an area called "comp.sys.amiga.programmer" - the area's name is too long. With FZ_RM you replace this name with some other (usually "csa.programmer") which Foozle can handle. After exporting you change it back to "comp.sys.amiga.programmer" and nobody notices the change. FZ_RM works in both ways. This way you only need one configfile (in which the "original" areanames and the "replace" areanames are put). Simply specify "reverse" order and FZ_RM replaces the "replaced" areanames with the "original" names. WHY FZ_RM? Simple: I got hold of some other tools doing the same. They were either SLOOOOOW (what are they DOING with files???) or humble to use (calling the tool for EVERY areaname you want to replace - stumbling over the packet all over again each time - doesn't make things faster). FZ_RM only reads the packet once, changes all things that have to be changed - and off we go. FZ_RM does ONLY work with FTS-1 compliant messages since it uses the defined offsets inside the messages. It shouldn't change messages it doesn't understand. FZ_RM does use save files. It puts the changed data in a temporary file called and replaces the original file with the changed after ending it's job. The Config File: ---------------- Simply put an original area name in one line, the name by which the original one shall be replaced in the next line - and start again. So an example config file would look like this: ..................................... comp.sys.amiga.programmer csa.programmer comp.sys.amiga.hardware csa.hardware comp.sys.amiga.what.is.this csa.gnag alt.wesley.die.die.die alt.whos.wesley ..................................... Examples (for those who still don't understand): Assume we use the config file shown above. We would (taking Foozle for simplicity) set up an arc-command that decrunches the archived echomail to an empty directory. After that we process all pkt-files in this directory with FZ_RM and our premade config file - you could use the famous list-command for this: list /#?.pkt lformat "FZ_RM %n config " Then we go, delete the archive from which the messages where extracted, move the modified packets into our processing directory (inbound, temp or whatever) and let Foozle do the rest. For export we simply use a bat that first calls FZ_RM for each packet and archives the packet after processing. This time we call FZ_RM with the "reverse" option to change the short area names into the original long ones. EXAMPLE WITH PACKERS: I use these two batches to process the incoming (zipped) bundles and my outgoing bundles (to be zipped as well). Note that I have put the scripts' names into Foozle's SetUp (FZI) as extractor and compressor for my uplink. ------------------....News_Unzip.....------------------ .key file/a .bra { .ket } unzip {file} list #?.pkt lformat "mail:bin/fz_rm %n config mail:config/remap.cfg" >t:exe execute t:exe delete t:exe ------------------....News_Unzip.....------------------ and here the second: ------------------....News_Zip.....------------------ .key destfile/a,file .bra { .ket } fz_rm {file} config mail:config/remap.cfg reverse zip -j -k {destfile} {file} ------------------....News_Zip.....------------------ Foozle is © Peer Hasselmeyer FZ_RM is (like many other Foozle Tools) © Marc Albrecht (former Marc Fuehrer) FZ_RM is FreeWare - spread it wherever you want - including all kinds of CDRom that supports Amiga Software - as long as NO FEE is asked for FZ_RM. Any kind of profit making of FZ_RM is strictly forbidden.