TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: ALL
from: TRACY LOGAN
date: 1998-05-17 02:04:00
subject: CLI solutions to LFN problems

    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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.