home *** CD-ROM | disk | FTP | other *** search
- GETFNX File name - extension splitter by Jim Groeneveld, vs. 1.0, 29/1-93.
- --------------------------------------------------------------------------
-
- ===DESCRIPTION===
-
- Given an existing [drive][path]filename[.ext] the program generates a batch
- file with the given file specification split into the _name_ part and the
- eventual _extension_. Necessary for the RCX program (by me too).
-
- ===PACKAGE===
-
- GETFNX BAT 8882 1-29-93 1:00a File name - extension splitter
- GETFNX B2C 9282 1-29-93 1:00a Prepared version for BAT2EXEC compiler
- GETFNX C0M 8107 1-29-93 1:00a Compiled version of GETFNX.B2C
- GETFNX EXE * 4763 1-29-93 1:00a LZEXE compressed version of GETFNX.COM
- GETFNX DOC 6169 1-29-93 1:00a This documentation file
- GETFNX HST 1572 1-29-93 1:00a History of GETFNX
- $GETFNX$ AUX * 28 1-29-93 1:00a Auxiliary file for GETFNX (see .DOC)
-
- * = absolutely necessary
-
- (*.COM files have been renamed to *.C0M in order to let DOS find and run
- the corresponding .EXE files.)
-
- Furthermore FIND.EXE or FIND.COM of the concerning DOS version is necessary.
-
- ===INSTALLATION===
-
- Put GETFNX.EXE/COM/BAT in your UTIL directory, to be found via your DOS PATH.
- Recommended location for auxiliary file $GETFNX$.AUX: the same directory.
- Quickest way to use $GETFNX$.AUX: specify environment variable GETFNX from
- DOS prompt (or in AUTOEXEC.BAT) to point to its (full) directory path
- (eventually including a deviant file name).
-
- ===Determination of location (and name) of auxiliary file $GETFNX$.AUX===
- The auxiliary file $GETFNX$.AUX will be searched for in the paths or as the
- full file specification (eventually with different, alternative filename and
- extension) from the data below in that order until it is found.
- a. the optional second parameter when calling GETFNX
- 1. the full _path_ only, incl. trailing '\' (e.g. 'GETFNX fn.x C:\UTIL\') or
- 2. the full _file_specification_ (e.g. 'GETFNX fn.x C:\UTIL\AUX-FILE.$$$')
- b. the environment variable %GETFNX% (specify environment variable GETFNX
- either from the DOS prompt or in AUTOEXEC.BAT) (DOS 3.x and above only)
- 1. the full _path_ only, incl. trailing '\' (e.g. 'SET GETFNX=C:\UTIL\') or
- 2. the full _file_specification_ (e.g. 'SET GETFNX=C:\UTIL\AUX-FILE.$$$')
- c. the ROOT directory of C: (C:\) (or automatically any APPENDed path)
- d. the ROOT directory of the CURRENT drive (\)
- e. the CURRENT directory (.\)
- f. the PARENT directory of the current one (..\)
- g. the SAME directory where GETFNX.BAT is residing:
- if EXPLICITELY specified when starting GETFNX (by path, DOS 3.x&up only)
- (NOT if GETFNX.BAT can only be found via the PATH!) (e.g. 'C:\UTIL\GETFNX')
- (compiled %0 includes the whole path to the program)
- h. the DOS 3.x PATH variable (this may take quite a while), new in version 1.1
-
- So make sure to place or name $GETFNX$.AUX such that it can be found in one of
- these ways. All this effort is done because the DOS ECHO command can not write
- lines without CRLF, so an external auxiliary file is necessary that already
- contains such a line.
-
- If using DOS 3.2&up and using the APPEND path utility do at least specify the
- '/X' parameter when calling APPEND for the first time or the auxiliary file
- still can not be found.
-
- ===USAGE===
-
- Syntax: GETFNX [d:][\][path\]filename.ext [[d:][\][path\][auxfilespec]]
- where d: = drive: (of concerning file);
- path = absolute or relative path ([\]sub1\sub2.....\);
- filename.ext = file specification to split into name and extension;
- auxfilespec = the eventual alt. auxiliary file name for $GETFNX$.AUX;
-
- Output: batch file GETFNX2.BAT with contents:
- echo off
- %1 %2 %3 %4 %5 %6 %7 %8 filename extension
- (extension may be 'none')
- to be called by application using:
- call GETFNX2 ownbatch [par1..par7] fn ext
- User's batch file 'ownbatch.bat' may do anything with these parameters.
-
- Help is being given by only entering: GETFNX, eventually followed by ?, /?, -?,
- /h or /H.
-
- ===REMARKS===
-
- Attention! Because of a bug in the batch compiler BAT2EXEC it may be possible
- that GETFNX locks up and tries to send output to the printer port(!).
- In that case do not use the compiled programs (.EXE, .COM), but only the batch
- (.BAT) files, by removing the .EXE and .COM files (see further BAT2EXEC.BUG).
-
- WARNING:
- Avoid the use of path and file names having %-characters in them. These are
- being written literally into auxiliary files and the %-characters including
- their successive characters may be interpreted as batch file or environment
- variables. The results will be unpredictable, but certainly erroneous.
-
- ===SYSTEM REQUIREMENTS===
- - IBM-PC (88/86/x86) or compatible
- - (MS)DOS 2.x or above
- With DOS 2.x the environment variable GETFNX can not be used. Besides,
- the DOS PATH can not be scanned for the auxiliary file. Another adaptation for
- DOS 2.x to include is to change .BAT file lines 'ECHO.' into 'ECHO @', in which
- '@' means the ascii-255 character, thus 'echo ', or it prints "ECHO is off".
- Furthermore, with DOS«3.3 one might change '@echo off' into 'echo off'.
- The DOS 3.3&up CALL command may be changed into 'COMMAND/C' with DOS«3.3 or
- one might apply an external CALL command for the lower DOS versions (by me too).
-
- - At least sufficient memory to load successive copies of COMMAND.COM (batch)
- or nested copies of GETFNX (compiled) and FIND and other additional
- temporary scratch batch files. It seems that using the .BAT files 64kb would
- be sufficient, while using the .COM or .EXE files 128kb is needed.
-
- Centrum voor Medische Informatica TNO <Email> | | |\/|
- TNO Center for Medical Informatics | GROENEVELD@CMI.TNO.NL | \_/ | | |
- ( CMI-TNO ) | Y. Groeneveld | GROENEVELD@CMIHP1.UUCP | Jim Groeneveld
- P.O.Box 124 | Wassenaarseweg 56 | GROENEVELD@TNO.NL | Schoolweg 14
- 2300 AC Leiden | 2333 AL Leiden | ...@HDETNO51.BITNET | 8071 BC Nunspeet
- Nederland. | (+31|0)71-181810 | Fax (+31|0)71-176382 | 03412-60413
-