Sortie¿ v1.2 by Terry May Copyright ½ 1993, Shark Bytes F R E E W A R E ! VERSIONS: """"""""" 1.0 - 22-May-91 - First public release! 1.1 - 01-Feb-93 - Added -Date sort. 1.2 - 06-Feb-93 - Fixed cosmetic bug with long folder names. INTRODUCTION: """"""""""""" Sortie was conceived while Tư Ltd. owned BBS Express! ST, and was our first freeware offering at Tư Ltd. BBS Express! ST has long since been sold to C&R Systems, but Sortie lives on -- now under Shark Bytes, my freeware/software 'company.' Although this program was designed and written mainly for use as an Express! utility, there are many other uses for a utility of this nature. What Sortie does is sort the files in any directory, alphabetically or by date (in ascending or descending order). Although the desktop and many programs will show you the files in order by Name or by Date (none in ascending order, that I know of), there are many programs, such as BBS Express! ST and most picture slide shows, that show files in the order they are on disk. Well, Sortie sorts them on disk in a perfectly SAFE way, so that the program in question shows them in the order you wish. You've probably seen programs that allow you to sort your AUTO folder, to put programs in a certain order. And you may have seen programs that allow you to sort files in alphabetical order. Sortie will not allow you to sort your directories on a file by file basis, but it will allow you to sort by Name and by Date, probably easier and faster than any other program currently in existance. Sortie operates in two modes, which I'll call "Batch" and "Manual": BATCH MODE: """"""""""" In Batch mode, Sortie will take on a command line the path\filename of an ASCII list (data file) of folders you'd like sorted, in the following format: D:\SORTIE\SORTIE.DAT [-DATE|+DATE] The path\filename can be anything and doesn't have to have a DAT extender (or any extender at all). Capitalization is optional and can even be mixed. "-DATE" and "+DATE" are optional parameters that tell Sortie to sort by Date in descending or ascending order, respectively. If "-DATE" or "+DATE" are not found, a Name sort will be done. Your data file can contain comments or anything else you wish. Just be sure that all valid path\filenames start in the first column and contain a drive specification. (Sortie looks at the 2nd character in each line for a ":" character to determine whether it's a path or a comment.) Trailing backslashes (\) are entirely optional, as is capitalization. Examples: c: <- Good D:\Files <- Good e:\FILES\ <- Good c <- Bad D:\Files <- Bad \FILES\ <- Bad Sortie will ignore any line that doesn't follow the prescribed format. If the line follows the prescribed format (i.e., any line with ":" as the second character), but can't find the path, no harm is done. Sortie will simply ring the bell, display "NOT FOUND" in the status window, and then go on to the next line. It is not possible to sort folders by Name and Date on an individual basis within a Batch listing. ALL folders will be sorted either by Name or by Date, depending on the parameters sent on the command line. To sort on a folder by folder basis, use Manual mode or run Batch mode two or three times, using two or three separate data files and command lines. MANUAL MODE: """""""""""" Manual mode allows you to use the file selector to sort your directories one at a time. This mode is automatically envoked if Sortie is not given a valid path\filename on the command line, or if no command line was used. You will first be presented with an Alert box, asking if you wish to sort by -Date, Name or +Date. (Name is initially the default button, but after the 1st use on any session, the default will be the last button pressed.) Select -Date for sorting by date in descending order (i.e., newest files first); select Name for sorting by name, in alphabetical order; and select +Date for sorting by date in ascending order (oldest files first). Next you'll be given the file selector. Simply choose the directory or folder you wish to sort and press Return. If you change your mind and don't want to sort any directory, simply click on CANCEL in the file selector. After Sortie is done doing its thing you will again be presented the Alert box. Again choose your preferred sorting method for sorting a new folder. If you don't wish to sort anymore folders, simply click on any of the three buttons (or press Return) and then click on Cancel in the file selector. SCREEN DISPLAY: """"""""""""""" After receiving a valid path from your Batch list or from Manual mode, Sortie will go to work on sorting that directory. In the upper left hand corner is the File Counter. It counts only files that are being sorted. In the upper center is the Folder being sorted. And in the upper right corner is the Status indicator. The middle (and vast majority) of the screen is used to display the files currently being sorted. They will first be shown in inverse, with the Status indicator showing "Sorting." They will then be displayed again in normal text, with the Status indicator showing "Writing." The screen will hold 100 filenames. If you're sorting more than that, Sortie will not clear the screen, but will simply start over in the first filename 'slot.' The screen is not cleared, so that you can see what Sortie has done on the previous screen. A ">" marker tells you what file is currently being sorted, so there is no confusion. With each new sort (even if there are no files to sort), the screen will be cleared, as if you were starting new. MISCELLANEOUS: """""""""""""" - Worry not about what Sortie is doing to your fragile drive. Sortie does not directly access your FAT; it uses only _legal_ GEMDOS calls. It is literally as safe as renaming files from your desktop. - If Sortie gives you an "Error 36" Alert box, check the folder you're sorting for a folder named \ZZZZZ\. If found, MOVE all files (if any) from the \ZZZZZ\ folder to their original folder and then delete the \ZZZZZ\ folder. Sortie uses a \ZZZZZ\ folder for temporary storage, and if it is aborted for any reason during the sorting process, you'll have to do this to restore those files to their original directory and before that original directory can be sorted again. - Sortie requires at least 2k of free space on the drive you're sorting, more if you have lots of files in that directory (figure an additional 1k for every 75 files or so). If you try to sort a directory on a drive without enough free space, no harm will be done, but Sortie will abort and you'll be presented with an Alert box. - Sortie will even sort files that are locked (set to READ ONLY). After sorting they'll be restored to locked status. (Locked files will be shown with an (*) asterisk next to them.) - Sortie will restore your Archive Bits to their original setting after it's done. This is useful if you backup your drives by Archive Bit; you surely don't want to backup the same file twice, just because it was sorted. - If you use a PC emulator, it is recommended you do NOT sort the root of your PC boot drive, as your System files will be sorted along with everything else, likely causing your drive to no longer autoboot. - Sortie will not run in LOW REZ, due to its 80x25 screen display. - Maximum files in a folder that can be sorted is 999. Any files over 999 will simply be ignored (no harm done). - Maximum lines in a Batch data file is 100. Any lines over 100 will be ignored (no harm done). - When using manual sort, Sortie will back out to the parent directory (if any) of the last path sorted, the next time it calls up the file selector for another sort. This is handy if you have a lot of folders with the same parent directory to sort. - Sortie will only sort enough files that are necessary to put your directory in the proper order. If the directory is already sorted, it won't do anything, obviously. If it has been previously sorted and then you add a file or two, then it's likely Sortie will only have to sort some of the files. - Name sort is useful for putting all your pics in order for a slideshow program, or for BBS (Express) programs that show files in the order in which they reside on the disk, and you want the files shown in alphabetical order. - -Date sort is useful for BBS (Express) programs that show files in the order in which they reside on the disk, and you want the files shown by date, with the newest files first. - +Date sort is useful for BBS (Express) programs that show files in the order in which they reside on the disk, and you want the files shown by date, oldest files first, particularly for weeding out old uploads. COPYRIGHT: """""""""" The "Sortie" name, program and documentation is a copyright of Shark Bytes. The Sortie program is FREEWARE and may be distributed freely, provided this documentation is included and unaltered. WARRANTY: """"""""" There is none! Although Sortie is believed to be perfectly safe, I still must insist that you use at your own risk. Shark Bytes will not accept responsibility for damage to hardware or loss of data that results from the use or misuse of this program. EPILOGUE: """"""""" Geez, so much documentation for such a simple, easy to use program! :^) If you have any comments (good or bad), suggestions, or whatever, please don't hesitate to drop me a line. Send private mail to: Delphi : OUTRIDER GEnie : OUTRIDER FidoNet : 1:209/745 (Terry May) AtariNet : 51:2/0 (Terry May) BBS : 702/435-0786 (Outrider) Happy sorting... - Terry May @ Shark Bytes