This is a read-only archive. No new posts or registrations. Privacy Page
Discussion

Truename command

1 min read

This thread's last reply is from . Advice, software, and links below may be out of date — treat specific steps and download links with caution.

truename (When placed before a file, will display the whole directory in which it exists) Tis a good way to find those files that seem to be hidden at times





Syntax:

TRUENAME filename - Prints the complete path to file.
TRUENAME directory - Prints the complete path to directory.

Note: If the path is in a network, it starts with a \\machine-name.

TRUENAME is analogous to the UNIX "whence" command. It returns the real fully-qualified path name for a command.

TRUENAME is useful in networks, where a physical drive may be mapped to a logical volume, and the user needs to know the physical location of the file. It ignores the DOS SUBST and JOIN commands, or network MAPped drives.

TRUENAME is an undocumented MS-DOS feature, but it is documented in JP Software's 4DOS software (COMMAND.COM replacement) as follows:

Syntax:

TRUENAME [d:][path]filename

Purpose:

Returns a fully qualified filename.

Comments:

TRUENAME will see "through" JOIN and SUBST commands, and
requires MS-DOS 3.0 or above.

Example:

The following command uses TRUENAME to get the true pathname
for a file:

c:\>subst d: c:\util\test
c:\>truename d:\test.exe

c:\util\test\test.exe

TRUENAME : will reveal the full name drive and path of the filename. If you specify a wildcard (*) in the filename, it will expand the filename to use question marks instead. If the path includes the ..\ sequence, TRUENAME will examine the directory structure and calculate the path.

Stranger still, the line:

TRUENAME \CRONK\FLIBBET\..\ART

…produces the response:

C:\CRONK\ART

…even if the directories \CRONK\FLIBBET and the file ART don't exist! Don't expect this command to work well across networks. After all, this is still undocumented in MS-DOS for a reason!

===========================================================================



(Sorry, you caught me running out the door. This, along with other commands and tricks can be found here http://www.textfiles.com/hacking/MICROSOFT/dosundoc.txt )