User's guide to FINDER.ENV
- How to set up the environment file for X-Finder R.10 -

				Gaku Nakagawa (Ran M. R.)
				E-mail: RXF10242@nifty.ne.jp

Using the X-Finder's built-in editor, you can press {Enter} at
the underscored line, or simply pressing {A} to {P}, to jump to
the selected subhead. {Backspace} will cancel the {Enter} key
and returns to the original position.  {0} returns to the menu.<BR>

<A NAME="0"></A>
<A HREF="#1">1: Switches</A>
<A HREF="#2">2: Macros</A>
<A HREF="#3">3: X-Finder specific commands</A>
<A HREF="#4">4: Setting up editor and viewer</A>
<A HREF="#5">5: Opening a file with its associated program</A>
<A HREF="#6">6: Commands in Special Menu</A>
<A HREF="#7">7: Commands assigned to Function Keys</A>
<A HREF="#8">8: Key Definition</A>
<A HREF="#9">9: Other settings</A>


<A HREF="WHATSNEW.TXT">- Read What's New (Changes)
<A HREF="FINDER.TXT">- Read X-Finder User's Guide
<A HREF="PAWMICN.DOC">- Read the PAWmTOP Icon User's Guide
<A HREF="FINHIS.TXT">- Read the Revision History of X-Finder


<A NAME="1">1: Switches</A>

By adding an entry to the environmental file, you can define
file names and extension for launching an associated program.
Also you can define the Palmtop screen and register
pre-defined commands. An entry consists of switches, macros
and commands.

The order of switches is free, except for the numerals used
in digits.

#Switches
  t	command is valid when {Shift} key is pressed
  c	valid when {Ctrl} key is pressed.
  m	valid when the item is marked
  f	valid regardless of being marked or unmarked
  s	valid when the object path and the currently displayed
	path is the same.
  o	valid when the object path and the currently displayed
	path is different
  a	valid when the object path is an archive file
  d	valid also for directory
  p	valid for palmtop
  *	command is valid when the object path is on a remote
	drive
  %	Valid only with split screen
  >	Valid on the right-hand window

  k	wait for any key after the command execution
  l	prohibit task switching
  n	move the cursor to next item after the command
	execution
  q	show dialog even if the item is not marked
  u	open the file on the cursor position, even if there are
	marked files
  z	do not show a dialog box, even if there are marked
	files
  r	for an archive file, update the file in the archive
	after the command execution
  /	for archive or remote files, do not extract or copy to
	the wastebasket (temporary directory)
  $	for execution on a server, set the current directory as
	a temporary directory.
  "	expand '*' on remote

  e	the command is keystrokes in hexadecimal notation, stuff
	it into the key buffer
  j	move the cursor to the position specified in the
	command in decimal number
  +	allocate all the memory available
  \	change directory specified in the command
  \'	change directory of the opposite window as specified in
	the command
  \<	change current directory to the left window path
  &	apply the filter specified in the command
  =	stuff the command into the clipboard and run
  ~	change directory immediately

  Number	If the switch begins with a number, allocate
	the specified memory to DOS process (If not specified,
	all the available memory is allocated).  If the
	available memory is less than the specified value,
	MaxDOS is used automatically.

Marked item is not executed unless there are f or m switches.


<A NAME="2">2: Macros</A>

#Macro						To be replaced
  						by (example):
  %c	Object file name	 		filename.txt
  %x	Object file name (without extension)	filename

  %p	Object path name 			c:\path\
  %q	Object path name (no trailing '\')	c:\path
  %o	Currently displayed path name		a:\temp\
  %r	Currently displayed path name (no 	a:\temp
	trailing '\')
  %m	Path name of the opposite window	c:\other\
  %n	Path name of the opposite window (no	c:\other
	trailing '\')
  %s	Marked path name (no trailing '\')	a:\mark
  %t	Wastebasket path name (no trailing	a:\trash
	 '\')
  %$	Server temporary path name (no		c:\lxtemp
	trailing '\')
  %z0	Environment File 		     c:\_dat\finder.env
  %z1	Palmtop file 			     c:\finder\palmtop^
  %*	'*' if the path is on a remote drive
  %@	Content of file
  %%	%

  %k	Edit/run the command

  %v	viewer program				$v
  %e	Editor program				vz

%v and %e will invoke the pre-defined viewer and editor.

Marked files or marked paths are the object files and object
paths.  If there are no marked file nor path, then the file or
path of the current cursor position is regarded as object
file/path.

If there are marked items, the current directory is the marked
path.


<A NAME="3">3: X-Finder specific commands</A>

  $c	Copy the next string to the clip board
  $m	Stuff the key buffer with the next string
  $p	Change directory to the path defined by the next
	string
  $t	Terminate the task defined by the next string
  $x	Run an EXM program defined by the next string
  $w	Change screen mode as specified by the next string
  *	Run a command defined by the next string on the Server

  ,	Switch prefix (placed after a switch)
  ||	Switch suffix (placed after a switch)
  |	Switch prefix (placed before a switch)
  ;	Separator for multiple commands

  cp	Copy
    Syntax: cp @#$ filename source destination
    @=0 Copy	@=1 Move	@=2 Synchronize
    #=0 File	#=1 Directory
    $=0 Update	$=1 Overwrite

X-Finder commands can pass a file name and other parameters to
built-in PIM applications and EXM programs.

$m accepts notations such as {Enter}, as well as normal
characters.

{Enter}, {Esc}, {Bs}, {Menu}, {Paste}, {Shift}, {Space},
{Tab}, {Zoom}, {F1}, {F2}, {F3}, {F4}, {F5}, {F6}, {F7}, {F8},
{F9}, {F10}, {Alt+alphabetical character} and
{Ctrl+alphabetical character} are substituted by its key code.

{x????} gives a hexadecimal code ????.  With ???? equal to 0,
it clears the key buffer.  You can add comment to keycode.
{xba00(Database)} is the keycode for Database key, where
'(Database)' is its comment.

.icn	,r	,$c %p%c;$x iconedit;$m {Menu}fo{Paste}

The above example copies the full path file name to the clip
board, run iconedit.exm, activate the menu bar, select {F}
(File) {O} (Open) and then do {Paste} onto the dialog with the
file name previously copied to the clipboard:

You can use {x????} when you know the key code for the
start key, such as the case for starting the built-in Memo
editor.

.gdb	,r	,$c %p%c;$m {xba00(DataBase)}{Esc}{Esc}{Esc}{F9}{Paste}{Enter}

The above example copies the full path to the clipboard, start
Database, pull up the file-open dialogbox by {F9}(Open) key
and paste onto it the file name previously copied to the
clipboard.

.wk1	,	,$m {xbc00}/fr%x{Enter}

The above line will run 1-2-3, and input {/} {f} {r}
(filename) {Enter}. Since $m can handle the maximum of 15
characters, you need to use it with care. Utilization of the
clipboard will be useful in this regard.
Note: The above example works only in the default directory of
      1-2-3.

More than one commands should be separated by ';', for
example:
dir a:;dir c:

The switches can be placed after the command, with '|' as a
separator.  They can be also placed before the command, with
',' or '||' as a separator.  For example,
  200k,mem
  mem|200k
  200k||mem
will reserve 200KB, run mem and wait for any key press (k).

$x should be followed by the file name of the EXM program to
launch. You should write a full path name of an EXM program, if
it is not registered in apname.lst nor moreexm.ini.  You need
to have MOREEXM resident for launching non-registered program.

Non-registered program can be launched without clearing the
screen by adding a switch '1'.  For example,
  =]      ,       ,$x LFTREE|1
will make {Shift+8} a start key to launch LFTREE in an
overlapping window.

$t should be followed by the name of the task you want to
close. The task names are those names displayed by TaskList or
on the TaskBar.  X-Finder itself cannot be closed by this
command. Use '$m {Alt+Q}' instead.

Examples:
%o	,	,$t Filer		#Close Filer at launch
%h	,	,$t LFTREE		#Close LF-Tree at exit
%6	,q	,$t *			#Close All
%v	,	,$t le;le

Using '*' as the task name will close all the tasks except
X-Finder.

How to use copy command 'cp':
  Syntax: cp @#$ filename source destination
      @=0 Copy	  @=1 Move      @=2 Synchronize
      #=0 File	  #=1 Directory
      $=0 Update  $=1 Overwrite

Example: Copy an object file (or files) to temporary directory.
  cp 001 %c %*%q *%$

  '001' define the mode as copy-file-overwrite.
  %c is replaced by the object file
  %* '*', if the object path is on a remote drive
  %q is the object path.
  *% is the Temporary directory on the server

  %* is placed since '*' at the beginning is ignored when the
  path name is expanded.


<A NAME="4">4: Setting up editor and viewer</A>

#Editor setting (me, vz, mini, PalEdit, flexpad, ted etc)
%e	,r	,$m {xb800(Memo)}{F9}{Paste}{Enter};$c	#Memo
#%e	,r	,$x me;$m {Alt+F}o{Bs}{Paste}{Enter};$c	#Memo Express
#%e	,240r	,vz					#Vz Editor
#%e	,240r	,mini					#Mifes mini
#%e	,200r	,pe					#Pal Edit

The default text editor is the built-in Memo editor. If you
like to use Pal Edit, for example, add '#' to the beginning of
the #Memo line and remove the first character '#' of the line
of #Pal Edit.  Same procedure is valid for Memo Express, Vz
Editor or Mifes mini.

Note: If you are using the language not supported by the
      internal Memo editor, such as Japanese or Chinese,
      changing to the adequate editor is highly recommended.

#Viewer setting (le, lex, vvc, miel, view, pn200, list etc)
%v	,/"	,$v					#XF Viewer
#%v	,	,$t le;$x le;$m %c{F8};$c		#Log Express
#%v	,120	,lex					#Log Express(DOS)
#%v	,100	,vvc					#VVC
#%v	,140	,miel					#miel

The default text viewer is the X-Finder's built-in viewer. If
you like to use LogExpress, for example, add '#' to the
beginning of the #Log Express line and remove the first
character '#' of the line ofXF Viewer.  Same procedure is valid
for miel or VVC.


<A NAME="5">5: Opening a file with its associated program</A>

Running an associated program with a matched filename or a
matched file extension is defined by a entry of a filename
/extension, switches and commands in the environment file.  My
recommendation is to start with the default FINDER.ENV and
modify the part where you understand to suite your demand.

Press [F7] to edit the environmental file.

Examples follows:

Notes:
  The line starting with '#' is a comment line. The file name
  should start with ':', then followed by switches and command,
  separated by ','. Comments are optional.

  From the second line within the same entry, the file name
  field should be left blank.  Only switches and command should
  be written.

  Definition of filename matches should come earlier than those 
  of file extension matches.

#Associated program definition by matched file name
#File name	Switch	Command			Comment
:autoexec.bat	,	,			#Do nothing
:battlog.log	,	,$x battlog
  The above line launches battlog.exm if the file is 
  battlog.log.

#Associated program definition by matched file extension

  First entry is the file extension, followed by switches and
  commands, separated by ','. Comments are optional. From the
  second line, the file extension field is left blank and only
  switches and command are specified in this order.

#Ext	Switch	Command				Comment
.pcx	,100f	,pcxv %c
.mid	,f	,lxmidi -n1 -x -s -o16 %c	#play mid (double speed)
.snd	,f	,sndplay %c			#play snd
.wav	,f	,waveplay -a3 %c
.eva	,f	,eva %c

  All these lines has 'f' in the switch field and '<command>
  %c' in the command field. 'f' tells XF to run it regardless
  of being marked or not. The macro '%c' is replaced by the
  name of the file at the current cursor position or the name
  of the marked file. If you like to provide the full path,
  use '<command> %p%c' instead.

.bat	,	,%c %k				#bat
	,p	,%c
.exe	,k	,%c %k				#exe
	,tlk	,%c
.com	,k	,%c %k				#com
	,tlk	,%c

  Macro '%k' will edit or run the replaced file name as a
  command. Switch 'p' runs it on the palmtop screen.

.?db	,	,open %c

  A wildcard character '?' works in the extension field.

.bmp .jpg .gif
	,f	,lxpic %c

  More than one extensions can have a common definition of the
  command.

.c	,cklq	,lcc %x 			#Compile C
	,ctlq	,lsimake %x			#EXM MAKE
	,cq*/	,*lcc %x			#Compile C on Server
	,ctq*/	,*lsimake %x			#EXM MAKE on Server

  The last two lines above has a switch '*' to run the command
  if the item is on a remote drive. The '*' in front of the
  command itself makes the command run on the Server side. The
  switch '/' suppress the expansion of files into the
  Wastebasket.

#Definition for a file with undefined extensions
.???	,	,%v %p%c		#View
	,t	,%e %p%c		#Edit
	,c	,$t le;$x le;$m %c{F8}	#LogExpress

  If there are no matched extensions or no matched switches,
  these commands will run.


<A NAME="6">6: Commands in Special Menu</A>

#Definition for 'Special' Menu
#	Switch	Command				Name
%1	,@	,$m {x4d00(->)}{Bs}{Bs}{Bs}HLP{Enter};%e %z0%k	#Edit &Help
	,c	,$c %z0;$x me;$m {Alt+F}o{Bs}{Paste}{Bs}{Bs}{Bs}HLP{Enter}	#Memo Express
%2	,\	,%n				#Goto &Other
%3	,\	,%s				#Goto &Marked Path
%4	,\~	,%t;,$m /"{x5300(Del)}		#Empty Wastebasket...
%5	,\'	,%k				#&Exchange Goto...
%6	,q	,$t *				#&Close All Task...
%7	,q$/	,cp 001 %c %*%q *%$;*lcc %x >er;cp 000 %x.EXE *%$ %*%q;cp 000 er *%$ %*%q		#Remote C Compile..
	,cr	,$c %z0;$x me;$m {Alt+F}o{Bs}{Paste}{Enter}	#MemoExpress
%8	,q$/	,cp 001 %c %*%q *%$;*lsimake %x;cp 000 %x.EXM *%$ %*%q;cp 000 er *%$ %*%q		#Remote EXM MAKE...
	,c	,$t le;$x le;$m %c{F8}	#LogExpress
%9	,240	,%%e %k 			#Edit &NewFile
	,cr	,$c %p%c;$x me;$m {Alt+F}o{Bs}{Paste}{Enter}	#MemoExpress
%0	,200d@	,%c%k				#&DOS(200KB)...
	,500cd@ ,%c%k

  All these commands can be selected and run from a pull-down
  menu 'Special', where the strings in the 'name' field
  appear. The character following '&' is displayed with an
  underline and works as a shortcut key within the menu.

  %1 to %9 defines the commands assigned to {Shift+F1} to
  {Shift+F9}. %0 defines {Shift+F10}. Switch 'c' defines the
  commands run by {Ctrl+F1} to {Ctrl+F10}.

  {Shift+F7} and {Shift+F8} copies the file from the 100/200LX
  to the server and compiles on the server.  After compiling,
  the executable and the redirected error log are copied to
  the100/200LX.


<A NAME="7">7: Commands assigned to Function Keys</A>

Here are the definitions for commands assigned to the function
keys during string entry.

#Function Key Definition for Directory Entry
%j	,\	,a:\bin 			#BIN
%j	,\	,a:\utl 			#UTL
%j	,\	,a:\_dat			#ADAT
%j	,\	,c:\_dat			#CDAT
%j	,\	,a:\log 			#LOG
%j	,\	,a:\la				#LA
%j	,\	,a:\pimdata			#PIM
%j	,\	,a:\ktx\mes			#MES
%j	,\	,a:\temp			#TEMP
%j	,\	,*c:\log			#*LOG

  The labels after '#' are displayed for each function keys.
  The switch '\' is 'change directory' command.

#Function Key Definition for Command Entry
%j	,	,$x fsearch			#Fsearch
%j	,	,$x keym			#KeyM
%j	,	,$x todo			#ToDo
%j	,	,$x fit 			#FIT
%j	,	,$x eng2jap			#Eng2Jap
%j	,	,$x tblx|1			#TaskBar
%j	,200k	,recvfat /a %k			#recvfat
%j	,100	,lxvm				#LXVM
%j	,	,$x me2 			#ME2
%j	,	,$x lftree|1			#Tree

#Function Key Definition for Filter Entry
%j	,&	,.snd				#snd
%j	,&	,.pcx				#pcx
%j	,&	,.c				#c
%j	,&	,*.*				#all
%j	,&	,.txt				#txt
%j	,&	,.doc				#doc
%j	,&	,.ini				#ini
%j	,&	,.env				#env
%j	,&	,.exe				#exe
%j	,&	,.com				#com

  The switch '&' is the filter command.  '.SND' works as
  '*.SND'. Commands other than '&' can be used.

#Function Key Definition for Filename Entry
%j	,	,				#
%j	,	,				#
%j	,	,				#
%j	,	,				#
%j	,	,$m +				#Attrib
%j	,	,$m {x2c(comma)}		#Extra
%j	,	,$m %%				#Copy As
%j	,	,$m {Shift}{x2c(comma)} 	#Title
%j	,	,				#Cancel
%j	,	,				#OK

  'OK' after '#' works as {Enter} key during command entry.


<A NAME="8">8: Key Definition</A>

o {Alphabetical character}, {Shift}+{Alphabetical character}
  and {Ctrl}+{Alphabetical character}

  A character (alphabet in lower case) should follow '='.
  {Shift} and {Ctrl} is specified with switches, in the same
  manner as in other command definitions.  A single key
  stroke, such as {A}, can be assigned to a command. when the
  key mode is set to Command mode.  This is similar to the
  usage of certain DOS filers.

  =a	,	,{A},<a command valid also for {Shift+A}
                      and {Ctrl+A}>

  To assign different commands to {A}, {Shift+A} and {Ctrl+A},
  the definition is as follow.

  =a	,	,<a command run by {A} and {Shift+A}>
  	,c	,<a command run by {Ctrl+A}>
  	,ct	,<a command run by {Ctrl+A}>

  The last matched command will be run, if there are more than
  one matches.


o {Shift}+{Application key}, {Numeric 2, 7, 8, 9}, {Shift}+
  {Numeric} and {Fn}+{Alphanumeric}

  A character should follow '='.

  For example {Shift+Filer} is assigned as follows:

  =!	,	,maxdos filmtn			#filmtn

  Notes: Notes: If a character cannot be entered by
         {Fn}+{Alphanumeric key}, it cannot be assigned.  The
         key definition of X-Finder has priority over the same
         key combination assigned to an EXM program as its
         start key.


<A NAME="9">9: Other settings</A>

If a directory or path setting does not use its full path, the
path relative to the directory of FINDER.ENV is assumed.  For
example, if c:\finder contains finder.env, the description
'icon' is regarded as 'c:\finder\icon'.

#Icon Directory
%i	icon
        ^^^^^ Change here if needed.

#Icon Directory
%a	icon.lzh
%a	icon.zip
  Note: Maximum two lines. The archives (.lzh, .zip  or .arj)
        should be uncompressed format.

#Folder Icon Directory
%f	iconfld
        ^^^^^^^ Change here if needed.

#Folder Icon Archives (Uncompressed Format)
%g	iconfld.lzh
%g	iconfld.zip
  Note: Maximum two lines. The archives (.lzh, .zip  or .arj)
        should be uncompressed format.

#Palmtop Path
%z	palmtop^
  Set a directory or archive in .lzh, .zip or .arj format.

#Wastebasket Directory
%t	,1	,trash
	 ^^ Change this '1' to '0' to disable wastebasket
	    function for file deletion.

#Temporary directory on the Server
%$	c:\lxtemp
        ^^^^^^^^^ Change here if needed.

#Default path for EXM
%b	c:\bin
        ^^^^^^ Change here if needed.
  Note: This path is searched if the '$x' command specifies an
        EXM program filename with no full path.

#Decompress from .lzh
%u	,160+l	,#lha e -amr

#Add to .lzh
%c	,192+l	,#lha u -zicn -zxf? -amx

#Decompress from .zip
%r	,200+l	,unzip
  Note: Change this 'unzip' to 'pkunzip' if you want to use
        PKUNZIP.EXE.

#Add to .zip
%q	,500+l	,zip			#160+l
  Notes: - Change this 'zip' to 'pkzip' if you want to use
           PKZIP.EXE.  If EMS is available to PKZIP, you may
           reduce the amount of assigned memory.
         - The string after '#' is the X-Finder switches used
           for deletion of files within a .zip archive.

#Key mode
%n	0
#	Key mode	0: Incremental search, 1: Command

#Show disk space and date
%y	00
#	|+-Shown disk space	0: No, 1: Yes
#	+--Date format:		0:yy-mm-dd  1:mm/dd/yy  2:dd/mm/yy  3:dd.mm.yy

  Note: If you use large capacity flash disk, set this option
        to 'do not show' for faster access.

#Show [.View Up] and hidden files
%p	001
#	||+-Show parent directory	0: No, 1: Yes
#	|+--Show hidden files		0: No, 1: Yes
#	+---Show filename in		0: Lower case, 1: Upper case

#RS-232C settings
%x	000
#	||+-RS-232C rate   0:115200bps  1:38400bps  2:38400bps(32 MHz)
#	|+--Halfrate	   0:Off  1:On
#	+---Transfer mode  0:Wide 1:Narrow 2:X1

  Note: - Wide is the new name for 'Turbo' mode in old version.
        - Narrow is the new name for 'Normal' mode in old
          version.

#Sort
%s	0001
#	|||+-Directory sort         0:Off  1:Name  2:Type  3:Size  4:Date
#	||+--Directory sort order:  0:Incremental 1:Decremental
#	|+---Palmtop sort           0:Off  1:Name  2:Type  3:Size  4:Date
#	+----Palmtop sort order:    0:Incremental 1:Decremental

#Icon/List/Detail mode and Full/Split screen
%w	01020
#	||||+-Left window		0:Icon 1:List 2:Detail
#	|||+--Right window		0:Icon 1:List 2:Detail
#	||+---Palmtop screen		0:Icon 1:List 2:Detail
#	|+----Directory screen mode	0:Full 1:Split
#	+-----Palmtop screen mode	0:Full 1:Split

#Opening action
%o	,	,
  (Enter the start-up commands, to be executed when you start
  X-Finder.)

#Closing action
%h	,	,
  (Enter the closing commands, to be executed when you quit
  X-Finder)



Note:
  This document is translated from Japanese by Toshiki Sasabe
  (toshiki@j.email.ne.jp).  The translator does not guarantee
  that the translation is free from errors. Use it at your own
  risk. In case of doubt, please refer to the original
  FINENV.TXT, which is also included in this package
