delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/27/19:24:17

From: wozzle!alane AT imageek DOT york DOT cuny DOT edu
Subject: Re: Library problems
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Fri, 27 May 1994 17:34:13 -0400 (EDT)

> > The interface was found in 'Undocumented DOS'. That is an
> > indispensible book for the DOS hacker.
> > 
> > To see how this works, just type 'truename somefile' at any DOS prompt
> > (where DOS is version 5.x or higher). It's built into command.com,
> > although that isn't documented either <sigh>.
> 
> Hmm... I just tried it out. Unfortunately the function (and the
> COMMAND.COM/4DOS commandline version) seems to only return the full path to
> the current directory and drive regardless of whether the file exists or
> not. For example, the command line version yields the following results:
> 
> 	C:\TMP> truename config.sys
> 	C:\TMP\CONFIG.SYS

Yes, it really just expands directories. E.g., if you had a server
called FSRV, and had a directory \usr\src mounted from that server
as your local drive s:, then you would get:

	c:\> truename s:foo.c
	\\FSRV\USR\SRC\FOO.C

This behavior is due in part to the fact that, if I recall correctly,
this is really an interface into that undocumented subsystem called the
Network Redirector.

So, once you get the full name, you still need to do an 'access' or
'stat' call to make sure it's real.

MSDOS didn't get this bad overnight. It took over 10 years of careful
development to make it what it is today. :)

-- 
J. Alan Eldridge (alane AT wozzle DOT linet DOT org)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019