How to use RobWare's File Investigator as a ZTreeWin universal file viewing add-on: Did you ever wanted to just hit the 'V'iew command in ZTreeWin and then let the software identify the type of file (e.g.word processor, graphics, HTML, etc.) and pass the file's contents to *any* appropriate file viewing application of your choice ? Here's how you can realize this by using Rob Zirnstein's fabulous File Investigator 1.10: 1.) Install and setup either the File Investigator 1.00 Shareware version (with nag screens), or acquire the US$ 10,- license for the nag-free 1.10 version. For the following we assume the programs directory is the default C:\RobWare 2.) Decide what viewing applications you want to use for what types of files and put together the path-/filenames of this apps on your harddisk 3.) Then create a batch-file in your ZTreeWin directory, named something like "ztw_view.bat" or so. 4.) Configure the file "ztw_view.bat" as ZTreeWin's default viewer by entering this filename in the '2 Viewer program' line of ZTreeWin's configuration screen (ALT-F10). 5.) Now, the contents of this ztw_view.bat file could look like what follows below. Please note, this is the (slightly modified) example of the .bat file I myself currently use; Modify this lines at your will to fit your personal requirements, i.e. your installed viewing applications/paths! If you have any questions regarding this, mail me at: xtfp@arkanda.net Using this new kind of ZTreeWin-"viewer" now enables you to perform some really cool tasks, for example playing a .wav or .mid file within a zipped archive, *without* having to unzip it to disk! (just open the archive with Alt-F5, highlight the file and hit 'V'iew!) :: Beginning of batch-file :: ZTreeWin/File Investigator support batch file by Mathias Winkler 1997/98 :: (Note: a double colon at the beginning of a line is equal to a 'REM' command, :: but is faster in execution; of course you can remove these comments anyhow) @echo off set arg1=%1 :: Call the File Investigator engine to identify the file type :: and pass it for further batch processing as errorlevel code call C:\RobWare\fiprop.exe %arg1% /q cls :: Continue the batch processing at the appropriate label :: depending on what file type has been detected if errorlevel==3 goto Wordview if errorlevel==4 goto Iview if errorlevel==5 goto Iview if errorlevel==22 goto Wordview if errorlevel==28 goto Wordview if errorlevel==58 goto Dbview if errorlevel==61 goto Dbview if errorlevel==91 goto Iview if errorlevel==114 goto Iview if errorlevel==118 goto Wordview if errorlevel==146 goto Iview if errorlevel==157 goto Wordview if errorlevel==162 goto Iview if errorlevel==166 goto Mplayer if errorlevel==173 goto Iview if errorlevel==185 goto Iview if errorlevel==215 goto Wordview if errorlevel==217 goto Wordview if errorlevel==221 goto Fontview if errorlevel==229 goto Wordview if errorlevel==234 goto Mplayer if errorlevel==240 goto Mplayer if errorlevel==260 goto Fontview if errorlevel==269 goto Wordview if errorlevel==297 goto Fontview if errorlevel==315 goto Viewht if errorlevel==321 goto Iview :: If none of the selected viewing applications fits, pass the file (again) :: to the File Investigator, in order just to view the file type details. ::. :: Use the fourth tab of the File Investigator's display ("Format") to identify :: the index/errorlevel value which 'fiprop' uses, to be able to easily include :: an additional entry in this batch-file for any further viewing :: application you are equipped with! :Fiprop call C:\RobWare\fiprop.exe %arg1% cls :: Here follows an additional option to view those unrelated file types :: in a universal viewer like Quick View Plus (this lines are not necessarily needed; :: you can omit them if you don't have such a universal viewer). echo. :: Ask the user whether to view the file in Quick View Plus (key Y pressed) :: or to end batch processing (keys N, X or Q pressed) choice /c:YNXQ /N Do you want to load file in QuickViewPlus Y,N ? if errorlevel==1 if not errorlevel==2 goto Quickview if errorlevel==2 goto end if errorlevel==3 goto end if errorlevel==4 goto end goto end :: The following are the several labels that are targeted to by :: the above "if errorlevel==... goto ..." -lines. ::. :: All the applications used here are either featured in the XTFP's Auxiliary Apps section, :: or are standard Windows (Win95) ones. ::. :Wordview :: Word processor/text file viewer View 13.4a call C:\viewers\View\viewn %arg1% goto end :Dbview :: DBase database file viewer dbVIEW call C:\viewers\DBView\DBView %arg1% goto end :Viewht :: DOS HTML offline viewer ViewHTML 2.5 call C:\viewers\VIEWHTML\VH %arg1% goto end :Iview :: Graphics viewer IrfanView32 start C:\viewers\I_view\I_view32.exe %arg1% goto end :Fontview :: Windows standard font viewer start C:\windows\fontview %arg1% goto end :Mplayer :: Windows standard multimedia player start C:\windows\mplayer /play /close %arg1% goto end :Quickview :: Optional entry for Quick View Plus (see above) start C:\viewers\QuikView\program\QVP32.exe %arg1% :end cls :: End of batch-file