I just figured out a couple of interesting workarounds that Rex & Co. put
in for us die-hard command-line users who must deal with Win95 LongFileNames:
First up is "CTRL-A" (see Help for Filename Completion), which switches
(in a couple of modes) between LFN and "normal" filename display during
/ filename completion; this is pretty neat, but I always manage to
forget about it until it's too late, etc., etc.
Never fear, though; as usual, 4DOS allows another solution -- the %@SFN[]
function! Simply set up aliases such as this for your non-LFN programs:
TED=c:\utils\ted3.com %@sfn[%1]
That'll take a command such as
TED "D:\TABS\Alice's Restaurant.TAB"
and turn it into:
TED D:\TABS\ALICE'~1.TAB
Another often-useful trick is to put LFN-style filenames into
DESCRIPT.ION files, with the LFN as the description of the short filename, so
the DESCRIPT.ION would look something like this:
ALICE'~1.TAB "Alice's Restaurant.TAB"
BLCKBIRD.TAB "blakbird.tab"
CINDER~1.TAB "Cinderella_Man.TAB"
This alias uses the %_DName variable (which gives the current
description-file name, for sysops using FILES.BBS instead of DESCRIPT.ION or
whatever), and the %@LFN and %@SFN functions [all on one line]:
LFN2DESCRIPTION=for LFN_Var in (*.*)
echo %@filename[%@sfn[%LFN_Var]]
%@filename["%@lfn[%LFN_Var]"] >>! %_DName
The %@FILENAME functions are there to get rid of the path info that's
prepended to the SFN/LFN input filename; the echoed lines are appended to the
description file, which is created if it does not exist (the "!" after the
">>" redirection).
This has been most useful for me with turning LFN-based directories into
a FILES.BBS-like format that RemoteAccess can deal with -- but could help
with any older program that uses FILES.BBS or DESCRIPT.ION; enjoy!
--- GEcho 1.11+
---------------
* Origin: Logan's Run -- running under 4DOS! (1:2613/111)
|