[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: LFN Utilities for Win32



** Reply to message from "Martin J. Osborne"  on
Tue, 17 Feb 2004 14:14:54 -0500

Martin:

> With the new version, dirlfn goes through the entire directory, adding a
> long filename for each entry. Thanks!

Good

> With the previous version I got to a situation in which 'ca file'
> yielded the error 'Function needs an empty window' when in fact several
> windows were available. (In this situation, 'ca file' worked
> fine.) If I run into the same situation with the latest U2 I'll will
> let you know.

That happened because the routine crashed, and when it crashed it left you with
default NewWindows NW=0 (which the routine uses internally for greater speed,
and then resets your own default on exit -- because it crashed, it didn't reset
-- therefore you need to manually command "d nw=1" or "d nw=3" or whatever you
use, to get "automatic windows" to open -- that's a very misleading PRompt
issued by the system, because it makes you think there aren't any windows
available, when actually the problem is NW=0 -- if it crashes again, issue d
NW=1 manually).

Here are a few things to try with these Utils:

Suppose you're editing a file called G:\XY4\ZAPERO~1\INDEX~2.SHT. You've
forgotten what the actual filename (or for that matter, the directory name) is.
Command LFN and a PRompt will report the full d:\path\lfn, e.g.
"G:\XY4\ZaPeRooooo\index.shtml".

If you want to _print_ that name to the screen so that you can use it, or write
it down or whatever, command LFN/PV [PutValue], and the d:\path\name
will be printed at current cursor position (CMline or text). If you don't want
the full path but just the bare long filename by itself, use LFN/FI. If you're
a programmer, LFN always stores its output (the LFN) in Save/Get 50, so that
you can use it further in a program (switch LFN/NV [NoValue] suppresses the
PRompt).

Suppose you're in a DIR display, and you see one file with an odd name, like
INDEX~2  SHT   136171   2-15-2004 10:26am
You can again use LFN to learn the real name, and if you put your cursor on
that line in the dir display, LFN/PV will do for this one file what DIRLFN does
for a whole directory: print the actual name at far right. You can still
CAll, DEL, READ, or whatever the file from the directory display, despite the
long name being written at far right (this assumes d XD=0, for Read/Write dir
displays -- something DIRLFN handles internally, but if you've already created
the dir display, and you use Read-Only directories, then an error will be
reported -- obviously, you can't write a fielname in a Read-only display!).

Suppose you have a slew of long filenames in an M$Word directory. You don't
know their short names. Command:
DIRSFN d:\docs\Family Reunion Attendee Resumes*.doc
You'll get a directory of only filenames matching that long dirspec --
something that would be impossible to do with accuracy and sans guesswork in
XyWrite natively, because you have no way of knowing what the minimal matching
filemask would be -- is it FAMILY~*.DOC? probably not, if there are more than
a few. Is it FAMI*.DOC? maybe, maybe not, because that spec might also pick
up "Famished in Finland.doc". DIRSFN will give you the exact matches, and only
the matches. It may be a rather esoteric problem, but it fills a hole, however
tiny, in the suite of Utils.

Anyway, the more you play with it, the more useful it becomes.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------