rps32513@uxa.cso.uiuc.edu (Ronald P. Smith) (04/08/91)
I recently loused up my hard drive with one of my programs and was hoping someone out there would be able to help. I wrote a little program which filters out unwanted strings from really huge text files (I.E. $20 $0D $0E would be replaced by $09 wherever it occured). Well, the idea was that the program would go through one file, making the necessary changes, then writing out to a file it creates. Since this was a small, quick program, I didn't bother with things like checking to make sure I didn't get a disk full error after doing an FSWrite (mistake #1). So what happened was, after running for a while, the disk became full, but my program kept going, oblivious to the situation. I saw no disk lights going, assumed my program messed up, so I hit the reset button (mistake #2).. So effectively, my program created a file, wrote a bunch of stuff to it, then quit, BEFORE doing an FSClose. When I got back into the finder, I noticed my HD was full, but the file that should've been created was non-existant. So somehow, my program caused the HD to think there was space being used for this file, but there is no such file, nothing for me to delete. I tried several HD utilities to no avail. Can anyone help out? Also, along the same lines, does anyone know of a program which will allow me to enter a "to search" and "to replace" string in hex, and have the program go through a text file, replacing every occurrence of one with the other? (I.E. $20 $0D $0E would be replaced by $09 wherever it occured)? Any help would be greatly appreciated! -RS rps32513@uxa.cso.uiuc.edu