File Attribute Zapper II Version 2.3 Public-Domain Software by Bruce A. Mah January 29, 1989 Introduction This program allows you to easily change the primary type, auxiliary type, and access bits of any ProDOS file. It's useful if, say, you accidentally downloaded a binary file from a telecommunications service as a text file or some such thing as that. FAZ II differs from other "filetype changing" programs in that it allows you to also change the auxiliary types and access bits of files. A Little Background For interested parties, here's the scoop on filetypes and access bits. Each ProDOS file possesses a primary and auxiliary filetype. They define "what" a file is; programs can identify their own files by assigning them unique combinations of primary and unique filetypes. Primary filetypes are one byte long and can have one of 256 different values, from 0 to 255. Auxiliary filetypes are two bytes long and can take on one of 65,536 different values. Originally, primary filetypes were intended to identify files and auxiliary filetypes were meant to provide additional information to programs using those files. For example, AppleWorks Word Processor files have primary type $1A. Their auxiliary types hold the status of each letter in the filename as upper or lower case. Over the years, it became apparent that ProDOS was going to "run out" of primary filetypes, as programmers used more and more primary types for their own uses. Apple Developer Technical Support stepped in and defined some new "generic" primary filetypes. The auxiliary type of these files indicate what program created the file. For example, primary type $D5 defines a "Music Sequence" file and the combination of primary type $D5 and auxiliary type $8001 indicates a file for "Diversi-Tune" by DSR, Inc. The file access bits define the ways in which a file may be accessed (make sense?). These control whether or not a file can deleted, renamed, written to, or read, and also indicate whether or not the file has changed since its last backup and whether or not the file should be "invisible." Required FAZ II requires an enhanced Apple //e, an Apple //c or //c Plus, or an Apple IIgs. If you don't have either of these, get FAZ 1.2 (the previous version of this program). Running FAZ II This is pretty simple...just launch the program FAZ.II from a program selector or AppleSoft Basic (in the latter case, type "-FAZ.II"). After a title page, you'll be presented with FAZ II's main menu. Housekeeping stuff: "Q" does a ProDOS Quit call and will return you to a program selector if you used one. "P" allows you to set a new ProDOS prefix. If you try to do something fishy, FAZ II will, of course, yell at you. "C" to change a file's attributes is (hopefully) why you ran this program in the first place. The next few sections describe what happens when you choose this command. File Selection and Operations While selecting a file to work with, you can use the arrow keys and Return to select a file. The display will scroll to show additional files. You can enter subdirectories by selecting them, and "pop out" by selecting the "Parent directory" entry. If you try to "pop out" of a volume's main directory, you'll be presented with a menu that allows you to switch volumes. Finally, Escape returns you to the main menu. Note that if you want to work with files in a directory which is more than one or two subdirectories away from the current directory, it may be faster to return to the main menu and use the "P" command to set a new prefix rather than trying to traverse through the directory structure. I think that sets some kind of record...the first part of this paragraph is all one sentence! Once you've chosen a file, you'll see some analysis of the primary and auxiliary filetypes, and a listing of the activated access bits. [A] Change Access Bits Allows you to modify the kinds of ways in which ProDOS can access this file. You can independently set any of the following bits: Destroy (delete), Rename, Backup, Invisible, Write, and Read. This command is useful if you want to set up non-standard permission on a file (i.e. you want to be able to rename and read, but not destroy or write a file). [F] Change complete Filetype (automatic) This allows you to change the primary and auxiliary types of a file according to a pre-defined list of file types. Simply scroll up and down to find the filetype you want to use, and press RETURN to select it. Easy! [P] Change Primary Type Change the primary filetype of this file; you'll be asked to enter the new type in hexadecimal. I made the program ask in hex for two reasons: 1) Hexadecimal is the most-used numbering system for filetypes on the Apple. 2) If you're using this command, it's somewhat assumed that you know what you're doing and won't be put off by a little bit of base-16 numbers. 3) It's a heck of a lot easier to write a hex conversion routine than a decimal conversion routine. [X] Change Auxiliary Type This command asks you for a new auxiliary type for a file. Again, enter the new type in hexadecimal (see "P" above for my reasoning). ESC Return to file selection menu Wonder what this option does... Customizing FAZ II Unlike FAZ I, FAZ II is _not_ user-customizeable. For various reasons, mostly arising from the fact that FAZ is now written in assembly language, adding filetypes to FAZ II is a more complex process, impractical without the source code. On the other hand, I'm quite open to suggestions as to filetypes to add. If you run across new ProDOS filetypes you think should be added to the program, please contact me at one of the electronic mail addresses listed below and I'll incorporate them into the next version. Back on the first hand, if you need to use some weird filetypes that no one else uses, you're probably better off sticking to FAZ I and its easy-to-change filetype list. Other Notes This is a useful little program, but, like any utility program can cause havoc if used carelessly or improperly. Let's be careful out there... FAZ II is sort of a kludge. It was thrown together out of parts of other programs (anyone here used my Three-Column Printer?) in the first three days of my winter vacation. Hopefully I did a good job of hiding this fact but then who am I deluding? Just let me know when you find the bugs! Much of the filetype data in this program was taken from the following sources: "File Type Changer" by Roger Wagner Publishing (a utility program included with Merlin 8/16). GS/OS Reference, Volume One, Beta Draft, from APDA. Apple II Filetype Notes, by Apple Computer, Inc. Rick Oshlo, John Clary, and Tony Pizza provided some valuable assistance (read "bug reports") with FAZ I. Thanks, guys! Feedback Feedback, comments, and gripes can be directed to me at the following e-mail addresses: GEnie: B.MAH CI$: 72406,350 AppleLink PE: BruceAMah Revision History Version 2.0--Original version of FAZ II. This is a complete rewrite of FAZ, version 1.0, done completely in 65C02 assembly language. No additional capabilities added, but a considerable speed improvement over FAZ I. Minor changes made to this documentation file to reflect changes in the program. Version 2.1--Eric Mueller (A2Pro Leader on GEnie) pointed out the need for a command to enter the prefix for those tortured souls (like himself) who have seven or eight levels of subdirectories. This has been added on the main menu. It is no longer possible to zap normal files to directory files using the automatic filetype change command If you really want to do it, you can still do it using the primary filetype change command. But you shouldn't be doing that anyway. Note that it has NEVER been possible to zap directories to normal filetypes. Filetypes for some more APW (Apple Programmer's Workshop) source files were added; existing types were cleaned up a bit. Source files were also cleaned up and restructured (not noticeable from the user level). Version 2.2--Tim Swihart suggested support for the "invisible" bit for GS/OS. This has been added...effect of this bit upon ProDOS 8 and ProDOS 16 is unknown. It is believed that these operating systems and existing utilities will ignore this bit, but caveat user. This version wasn't released for general distribution, but there may be a few copies floating around out there. Version 2.3--This version was released in response to Apple Computer's publication of its "File Type Notes" in January 1989. New filetypes from the FTNs were added and existing types were cleaned up considerably, but no changes were made to the actual program code. ---------- "Don't you just love personal software with little asides like this? I can do that because it's my company and there's no one to tell me that this is unprofessional. Who cares?" --Randy Brandt, in the "Patchmania" file on the PathFinder disk, published by JEM software.