© Copyright Clive E. Chapman 2008. All rights reserved.

FLVIEW User Guide

Version 5.00 (2008-07-25)


This page Other pages
Overview Main Page
Invocation Licence
Profile FL User Guide
Usage Notes FLCUST User Guide
Sample Profile FLFIND User Guide
  FLTREE User Guide
  TEE User Guide


In FL it is useful to have a function key that can edit or view files of any type. For this to be possible, FL must invoke the tool or program that is appropriate for the file extension, but FL itself does not have this knowledge. FLVIEW is a user-customisable program that addresses this problem. When you want to edit or view a particular file, you invoke FLVIEW, and FLVIEW then invokes the program that is appropriate for the file extension.

FLVIEW uses a profile to define the associations between file extensions and the programs that edit or view files with those extensions. The default name of the profile is "FLVIEW.PRO", and its default location is the directory in which FLVIEW.EXE resides. A sample profile is provided for each supported operating system, but you will need to modify these to suit your own requirements.

[Back to Contents]


FLVIEW [fv_opts] filespec [cmd_opts]

where square brackets [ ] denote optional items. Parameters and options are as follows:

These are FLVIEW options; if specified, they must occur before the filespec. Note: this is the only command in the entire FL toolset where the position of the options is significant; in all other cases options can be specified before or after the positional parameters. Options can be specifed using either "/" or "-" as the option prefix character. The following options are valid:

This option specifies the FLVIEW profile to be used. If the drive and/or path is specified, the filespec is resolved using the usual rules. If neither is specified, the profile is read from the directory containing FLVIEW.EXE. To read a profile that resides in the current directory, use the "." placeholder. Example:


If the extension and its preceding dot are omitted, "pro" is used for the file extension. To read a profile that has no file extension, end the name with a dot. Example:


If the profile filespec contains blanks, the entire option (including the option name) must be enclosed in double quotes. Example:

"/p:C:\Documents and Settings\Me\My FLVIEW.Pro"

This option specifies a selector that controls which of several alternative definitions in the profile should be used. The profile can contain several different definitions for the same file extension, with each definition having a different selector. The definition used is the one that matches both the file extension and the selector.

The selector value is a string of one or more characters, and is not case sensitive. The special value "*" can be used to indicate that any profile selector value is acceptable (so the definition used is the first one for that file extension in the profile). If the /S option is not specified, "/S:*" is assumed.

This option can be used to choose a different definition in different situations. For example, you might use one program for browsing a file, and a different program for editing it. You can choose between these two by using a different selector for each – you might use "/S:BROWSE" for the browse program, and "/S:EDIT" for the edit program. In FL you would use two different function keys, one for browse and the other for edit; they might have these key definitions:

Key Definition

In these examples, "#" is the command prefix character. If you want to use "/" as your command prefix character, remember to double-up the "/" used for the option ("//S:EDIT"); alternatively, use the "-" option prefix character ("-S:EDIT").

This option (Test) causes FLVIEW to perform its normal processing, but without invoking the program defined in the profile. Instead, FLVIEW displays information about its processing, ending with the command that would be used to invoke the program defined in the profile. This is useful for checking that FLVIEW is invoking the program with the parameters and options that you intended.

This option causes FLVIEW to display brief help information.

This is the filespec to be processed. It is passed without modification to the program defined in the profile. If the filespec is incomplete, it is the responsibility of the program invoked to resolve the filespec as necessary. If the filespec contains blanks, the filespec must be enclosed in double quotes. If the filespec does not contain blanks, the double quotes are optional.

These are options that are appended to the command defined in the profile, but for the current invocation only. The command defined in the profile can also include options, but those options are always passed to the program invoked. The command options specified on the invocation of FLVIEW allow you to specify additional options that you want on some invocations of the program, but not others.

[Back to Contents]


FLVIEW requires a profile to define the association between a file extension and the program used to edit or view files with that extension. Use the following guidelines to create your profile:

  1. The profile is a plain text file; use any plain-text editor to create it or modify it.

  2. Blank lines are ignored; use them to group definitions and improve readability.

  3. Lines with an exclamation character ("!") as the first non-blank character are ignored; use them to add comments or temporarily omit definition lines.

  4. A definition must be contained entirely on one line; the definition cannot span two or more lines.

  5. A definition line consists of the following items, in the order shown:

    • Zero or more blanks
    • A file extension, optionally enclosed in quotes
    • One or more blanks
    • A selector value, optionally enclosed in quotes
    • One or more blanks
    • The command to be executed, with quotes where needed

  6. If the file extension contains blanks, the file extension must be enclosed in double-quote characters. If the file extension does not contain blanks, the quotes are optional. The same rule applies to the selector.

  7. The file extension and selector are not case sensitive, so "JPG" or "Jpg" on the FLVIEW invocation matches "jpg" in the profile, and "/S:EDIT" or "/s:edit" on the FL invocation matches "Edit" in the profile.

  8. One special file extension is recognised, namely "" (the null string). Use the null file extension to define what program should be invoked for files that do not have a file extension. The double-quote characters are required for the null string.

  9. It is valid for the file extension and selector to contain wildcard characters ("*" and "?"). FLVIEW processes wildcard characters in the same way as FL. If the filespec extension or selector would match multiple definitions in the profile, processing of the profile stops at the first definition that matches both.

    If "*" is specified for the extension in the profile, it matches ALL file extensions, including those with null extensions (""). If you want a definition that matches all files other than those with null extensions, specify "?*" for the extension in the profile.

    If "*" is specified for the selector in the profile, it matches ALL selectors specified on the FLVIEW invocation.

  10. In the command to be executed, double quotes should be used as required. For example, if the command name is fully qualified, and the path contains blanks, the command filespec must be enclosed in double quotes. Example:

    "c:\program files\internet explorer\iexplore.exe"

  11. In the command to be executed, you must use substitution codes to indicate where the filespec (or parts thereof) should be placed.

    A substitution code consists of the left square bracket, followed immediately by a single character in upper or lower case, followed in turn by the right square bracket. The following substitution codes are valid:

    Replaced by Example
    [d] Drive E:
    [e] Extension (no dot) jpg
    [f] File ("name.ext") sunflower.jpg
    [n] Name sunflower
    [p] Path \photos\
    [w] Whole filespec E:\photos\sunflower.jpg

    The entire three-character substitution code is replaced by the appropriate part of the filespec specified on the invocation of FLVIEW. Note that if parts of the filespec are missing on the invocation of FLVIEW (for example, the drive and path), the values substituted will be the null string for those omitted parts.

    FLVIEW does not scan the strings substituted, so if the filespec itself happens to contain a valid substitution code, it is passed unaltered to the program invoked.

  12. When FLVIEW processes a substitution code, FLVIEW does not add double quotes around the substituted filespec, even if they were specified on the invocation of FLVIEW. If the program to be invoked requires double quotes around the filespec in order to be able to parse the filespec correctly when the filespec contains blanks, the quotes must be specified explicitly in the definition in the profile. The reason for this is that some programs do not accept double quotes around filespecs, even when the filespec contains blanks (the Windows program SHIMGVW is like this).

  13. Currently there is no way that you can pass a substitution code itself to the program invoked (for example, as an option), as there is no "escape sequence" defined. Contact the author if you need this facility.

See below for a sample profile.

[Back to Contents]

Usage Notes

  1. The simplest way to use FLVIEW with FL is to define an F-key to have the value "FLVIEW.EXE", but you may prefer the following more-versatile definition (where "#" is the FL command prefix character):

    !#r #\*.* #|| flview.exe #

    This definition behaves as follows: if the line where the command is entered is a directory, that directory is made the current directory and its contents are displayed. If the line is a file, FLVIEW is invoked to invoke in turn the program appropriate for the file extension of the file.

    Note: in this example, the exclamation character "!" at the start of the command is FL's line prefix character that suppresses echo of the command on the screen (useful for full-screen applications).

  2. For some file extensions you may want to use two or more different programs that work with that file extension – perhaps one program to view the file, and another to edit it. For example, for a JPG file on Windows you might want to use SHIMGVW ("Shell Image View") to view the file quickly, and Adobe Photoshop Elements to edit it.

    The FL way to do this is to use two different F-keys – a "View" F-key and an "Edit" F-key. You use FLVIEW with both keys, but use a different selector for each; the selector causes FLVIEW to use the appropriate definition from the profile. For example, you might use "/S:V" for the view program, and "/S:E" for the edit program.

  3. Although FLVIEW is distributed as part of the FL package, it is not limited to use with FL. For example, FLVIEW could be used from a BAT program to invoke a program to process a file according to its file extension.

  4. Be aware that OS installations vary, and that the tools and paths shown in the sample profiles are unlikely be correct for your system. You should check each definition on your system, and modify the profile appropriately.

[Back to Contents]

Sample Profile

A sample profile is shown below. Note that for display on this page, long definitions have been split over two lines (indicated by the ellipsis "..."). However, in the profile itself each definition must be contained entirely on one line.

! Sample FLVIEW profile for:
!   Windows 95/98/98SE/ME/NT/2000/XP/Vista
! Blank lines and lines beginning with "!" char are ignored.
! Use subst codes to indicate where filespec should appear:
!   [d]  drive ("d:")              [n]  name
!   [p]  path  ("\path\")          [e]  ext (no dot)
!   [f]  file  ("name.ext")        [w]  whole filespec
! Wildcard chars are valid in Extension and Selector cols.

! Ext  Sel  Command
! ---  ---  -------------------------------------------------
  avi   *   "c:\program files\videolan\vlc\vlc.exe" "[w]"
  htm  BRW  "c:\program files\internet explorer\...
            ...iexplore.exe" "[w]"
  htm  EDT  "c:\windows\notepad.exe" "[w]"
  jpg  BRW  "rundll32.exe" c:\windows\system32\...
            ...shimgvw.dll,imageview_fullscreen [w]
  jpg  EDT  "c:\program files\adobe\photoshop elements 2\...
            ...photoshopelements.exe" "[w]"
  pdf   *   "c:\program files\adobe\acrobat 7.0\reader\...
            ...acrord32.exe" "[w]"
  rtf   *   "c:\program files\windows nt\accessories\...
            ...wordpad.exe" "[w]"
  wma   *   "c:\program files\windows media player\...
            ...wmplayer.exe" "[w]"
  ""    *   "c:\windows\notepad.exe" "[w]"
  *     *   "c:\windows\notepad.exe" "[w]"
! ---  ---  -------------------------------------------------
! Ext  Sel  Command

In the sample profile shown above, separate browse and edit functions are defined for files with extensions of HTM and JPG, so the definitions for those extensions have specific selector values ("BRW" and "EDT"). For the other file extensions, the same program is used for both browse and edit, so they use a selector of "*".

[Back to Contents]

Valid HTML 4.01 Page last changed: 2008-07-25 Valid CSS