Mail Archives: djgpp-workers/2000/03/01/08:29:26
On Tue, 29 Feb 2000, Mariano Alvarez Fernández wrote:
[... getting the SFN of a file, given the LFN ...]
> Now, I only need the put routine :-) I'm playing with a crazy idea:
You want the routine that lets you set the SFN, by hand, for an exiting
file. There is no such thing, and no safe way to write one without
circumventing Windows.
The only halfway safe method of doing what you want is to do it from raw
DOS, where no LFN driver is present in the OS. Then use the very
old-fashioned FCB functions, or maybe even direct disc writes, to modify
the directory entries by hand to modify the SFN, but make sure you don't
damage the LFN, while doing that. That's the only way I see, short of
replacing Windows' own LFN driver, or the hard disk driver, you'll get
that done. It's also the way tools like DOSLFNBK work, AFAIK.
Windows doesn't give you control over directory contents (FCB functions
are forbidden, with a reason), so you can't do this from inside it.
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -