Short: Defragment files on an AFS drive Author: kstrauser@gxl.com (Kirk Strauser) Uploader: kstrauser gxl com (Kirk Strauser) Type: disk/optim Version: 1.1 Replaces: disk/optim/AFSFileDefrag.lha Requires: AFS v2.4+ (16.16), DiskValid 1.6+ Architecture: m68k-amigaos Defrag 1.0 by Kirk Strauser, June 19 '96 1. What is it? Defrag is a simple AREXX program I wrote to defragment the FILES on an AFS disk/partition. 2. Huh? I though AFS didn't fragment files... Well, it does a great job of not breaking up NEW files. However, it's not so great at keeping appended files in one chunk. This isn't a bug or design failure; that's just the way things are. 3. How does it work? Simple. Defrag runs DiskValid on the stated disk/partition, then scans the output for any fragmented files. If it finds any, it copies them to T:, then back to the original location. AFS automatically writes the files back defragmented, so you're all clean and ready to go! 4. How is it used? Defrag NameOfVolume MinFragments where NameOfVolume is an AFS device, and MinFragments is the minimum number of fragments a file must be broken into to be defragmented. Example: Defrag DH1: 2 will scan DH1:, and defragments all files broken into 2 or more parts. 5. Why would anyone possibly not want to defrag all files? Well, imagine your drive has 40 fragmented files, most files being broken into 2 sections. If only 1 or 2 files are badly fragmented, do you really want to spend the time to fix everything? If you do, that's your right. I just don't always feel like messing with it. By the way, Defrag DOES default to fixing all files. This is just an option I wanted left open, if only for my own personal use. 6. How sure am I that this is safe? Pretty darn sure. No files are deleted (except for the temp files, after the program is done), and all operations are normal DOS calls. If you have any doubts, check the code yourself. It's VERY straightforward. Oh, yeah, there's also some bare-bones error checking in there. 7. How responsible will I be if your HD catches on fire? Not one bit. I wrote this in about 20 minutes, and have done minimal testing on it. This program works for me, and I've heard other people request something similar, so here it is. Remember, this program is free, so you get what you pay for. 8. How can I be contacted? Please direct any questions/comments/requests/ideas to kstrauser@gxl.com.