ÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞ QTRIB - File Attribute Utility William Finck Bayonne, NJ Version 1.6 - February 19, 1992 What's QTRIB ??? A user-friendly replacement for DOS' "ATTRIB" command, that also does one or two other things. ÞÞÞÞÞÞÞÞÞ File Attributes ÞÞÞÞÞÞÞÞÞÞ What's a File Attribute ??? A "marker" on a file which determines how the user (or third-party software) may treat it. For those of you who aren't familiar with file attributes, I'll do my best to explain some of the attributes in simple terms: Files may have the following attributes: Archive (see below) Read Only You can see a read-only file when you type "DIR", and you can view it with a file viewer, but you may not delete or change it. DOS will execute read-only files (.BAT, .COM, or .EXE); Hidden You may not delete or change these files, and you won't see them with DOS' "DIR" command, although many DOS shell programs read these files. You cannot execute hidden .COM, .BAT, or .EXE files from the command line. The hidden attribute may also be applied to directories, although you can still change to these directories and execute programs within them. System System files are just like "hidden" files. Although the system attribute is usually reserved for the operating system, many third-party software programs use this attribute to protect "crucial" files. See the DOS users manual for information on the system files in the root directory of your hard disk/bootable floppy. (MS-DOS: IO.SYS & MSDOS.SYS /// IBM-DOS: I think they're called IBMIO.SYS and PCDOS.SYS). Like hidden files, most DOS shell programs can view/display system files. ÞÞÞÞÞÞ The DOS "ATTRIB" Command ÞÞÞÞÞÞ What the DOS "ATTRIB" Command does that QTRIB doesn't: Set the "Archive" Attribute. Is it necessary ??? If so, then please let me know. This attribute has no effect on the read/write access of a file, however, it is used by DOS' "XCOPY", "BACKUP", and "RESTORE" commands, according to the DOS manual. I'm not sure how, since I've never had use for a backup program, especially DOS'. QTRIB will leave this attribute alone, unless I get enough requests to warrant a change. The DOS 5 " . ", with QTRIB command line parameters, typing *.* is still neccessary. The "/s" (subdirectory) switch. QTRIB does not support this switch, but anything's possible if there's a demand for it. For more information on the ATTRIB command, refer to your MS-DOS or PC-DOS manual. What QTRIB does that the DOS "ATTRIB" Command doesn't: Give the user a friendly, ordered environment in which to view/set file and directory attributes, along with the ability to Delete/Rename files as found neccessary, changing drives/directories with just a few keystrokes. ÞÞÞÞÞÞÞÞÞ CAREFUL !!! ÞÞÞÞÞÞÞÞÞÞ Hidden Directories & the BOOT Process. There is no sense in making a directory "read only", since it does not protect the directory. QTRIB has the ability to hide (or unhide) directories. You may still access them, but you will not see them with the DOS "DIR" command. Booting your machine with AUTOEXEC.BAT or CONFIG.SYS commands in hidden directories will NOT affect the way your machine boots. The boot process doesn't care whether directories in your PATH are hidden or not, it finds them. A hidden directory is just a good place to stash stuff that you don't want to share readily (and it's alot better than putting your stuff on unlabeled floppies that you are going to accidentally format in a week or so). Although internal DOS commands like "PATH" and CD\ will find and use hidden directories, DOS will NOT execute a hidden file, EVEN WHEN BOOTING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! QTRIB has been tested on: a 386-25Mhz with super-VGA (DOS 5.0) a 386-16Mhz with VGA (DOS 5.0) a DELL NX-20Mhz notebook (LCD)(DOS 5.0) a clone 8088-10Mhz with CGA (DOS 4.01) I CANNOT foretell results with use of the following: Digital Research DOS (although it should work fine, if DR-DOS is as compatible as it claims to be). 4-DOS. Although I downloaded this program quite some time ago, I never had the time to try it (with apologies to JP Software). Any MS-DOS or PC-DOS version lower than 3.3. Qtrib WILL NOT look very nice in 40x25 video text mode, if this is all your monitor supports, forget it. Microsoft Windows Users: Windows doesn't like it when you change the attributes of the following files: 386SPART.PAR (your swapfile, if you have one, found in the root directory of the drive where you told Windows to put it). SPART.PAR (has something to do with your swapfile, found in the directory where you installed Windows). Changing the attributes of any of these files to "READ ONLY" may cause you to get a "Your Swapfile Is Corrupt" message. SPART.PAR should have a 'hidden' attribute. 386SPART.PAR should have attributes of 'hidden' and 'system', but NOT 'read-only', since Windows has to write to it. ÞÞÞÞÞÞÞÞÞ EXAMPLE COMMANDS ÞÞÞÞÞÞÞÞÞÞ The file QTRIB.EXE should be copied to a directory in your PATH. qtrib ? the help screen qtrib c: the full program in the root directory of drive C: qtrib h c:*.* hides all files in the root direciory of drive c: qtrib a c:\dir\data\*.* sets ALL file attributes (system, hidden, and read-only) for ALL files within the named directory. qtrib c:\windows\ Invalid Directory Type qtrib c:\windows QTRIB cannot delete or rename files from the command line. It is just as easy to use standard DOS commands for these routines. QTRIB will not execute in an empty ROOT directory. A sub- directory with no files is NOT considered by DOS to be empty, since it contains the "." and ".." files. If you type QTRIB F:, and the root directory of drive F is empty, QTRIB will give you a message, and then execute in the directory where you started. If you start at drive F:, and it is empty, QTRIB will quit after the message. If the last file in a root directory is deleted, QTRIB will either quit or return to the drive you started from, depending on where you started. QTRIB implements a built-in DOS ERROR handler (ie: diskette drive not ready, etc...). The program will intercept these errors, and return to the drive you were on before the error, after a message and a keystroke. **************************************** Batch file fanatics: On the Command Line: QTRIB has an exit code of 1 if it is executed with an invalid directory, and an exit code of 2 if it is executed with an invalid filename. All other exit codes are zero. If these exit codes aren't sufficient, let me know, I'm not into complicated batch files. *************************************** ÞÞÞÞÞÞÞ BUGS THAT I KNOW ABOUT ÞÞÞÞÞÞÞÞ If you run QTRIB from within MS-WINDOWS, and attempt to manipulate a file that Windows has open, you will get an error message stating: "Check DISK/DISKETTE Format". I don't know why, since the error handler should respond with a "SHARE VIOLATION" message, but don't worry, nothing's wrong with your disk and the program won't bomb. Either close these files in Windows and return to the program, or wait until you close Windows. ÞÞÞÞÞÞÞÞÞ HISTORY ÞÞÞÞÞÞÞÞÞÞ 2/18/92 -- Version 1.4 of QTRIB uploaded to the BBS' mentioned in FEEDBACK. 2/19/92 -- Found a bug which caused QTRIB not to work from the command line in the current directory only (ie: with no path entered into the command tail - don't ask !!!) fixed it immediately. -- Added Directory navigation, a second HELP screen, and released the program as version 1.5 (prematurely, because of the bug). 2/19/92 -- Removed some redundant code in the help screens and in the programs exit notice. -- Added error checking so that file attributes couldn't be toggled with the F9/F10 hide/unhide Directory keys. 2/20/92 -- Added function to exit to DOS within the Current Directory. -- Added File Rename function. 2/21/92 -- Added ability to change disk drives within program. -- Changed Delete File key from ALT-D to DELETE ÞÞÞÞÞÞÞÞÞ FEEDBACK ÞÞÞÞÞÞÞÞÞÞ I have built all the error checking into the program that I could think of. If you get an error that the program cannot recover from, PLEASE let me know what happened, so that I can correct it. I would appreciate any comments, criticism, or (yecch!!!) bug reports. I can be reached on one of the following BBS': COMPUSERVE: William Finck 76307, 1570 (at least monthly) NEW JERSEY PC USER'S GROUP: 201-471-6391 (at least monthly) BYTES 'n BITS BBS: 201-437-6391 (quite often !!!) ***************************************************************** SUPPORT BOARD: Bill's Bar And Grill (BBS) 201-330-8119 (almost daily) Bill O'Neill, SYSOP (and my beta tester, thanks Bill) ***************************************************************** QTRIB was written with the Microsoft "C" professional development system, version 6.00A. ÞÞÞÞÞÞÞÞÞ SHAREWARE ÞÞÞÞÞÞÞÞÞÞ QTRIB is distributed as shareware, and it's future depends on how well it is supported. If you would like to receive the next version of this program, please send $15.00 (and a return address) to the following address: William Finck 10 E 33rd Street Bayonne, NJ 07002 Along with an improved version of the program, you will receive a copy of anything else I am working on at the time I ship your diskette. Be sure to specify media type. ÞÞÞÞÞÞÞÞÞ DISTRIBUTION ÞÞÞÞÞÞÞÞÞÞ Feel free to distribute (please !) this program anywhere, as long as the files contained in the original archive are not altered in any way, and subsequent archives contain both the original executable and this text file. ÞÞÞÞÞÞÞÞÞ PROMISES ÞÞÞÞÞÞÞÞÞÞ QTRIB will contain a text file viewer, along with many other enhancements. ÞÞÞÞÞÞÞÞÞ NOTICES ÞÞÞÞÞÞÞÞÞÞ The author disclaims any liability for damages due to the use of QTRIB. This program is distributed WITHOUT warranty. All trademarks are property of thier respective owners, they know who they are. ÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞ