Ticket #44051

Add support for 'truename'

Open Date: 2022-03-08 00:19 Last Update: 2022-03-13 22:57

Reporter:
Owner:
Status:
Closed
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None

Details

This is an undocumented command since MS-DOS 4.0.

Ticket History (3/9 Histories)

2022-03-08 00:19 Updated by: bttr
  • New Ticket "Add support for 'truename'" created
2022-03-08 01:30 Updated by: mateuszviste
Comment

can you explain what it does exactly, what arguments it supports etc? It is not present in the MS-DOS help and truename /? yields only an error message.

(Edited, 2022-03-08 01:30 Updated by: mateuszviste)
2022-03-08 04:01 Updated by: bttr
Comment

Doin' some copy & paste work...

From https://amb.osdn.io/phpamb.php?fname=lib/fdhelpen.amb&f=truename.ama

Syntax:

  TRUENAME [drive][path][filename]
  TRUENAME [/?]
           drive     The drive letter, e.g. C:
           path      The directory, e.g. \example\
           filename  The file, e.g. test.txt

From https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf

Syntax
TRUENAME [path |% environmentvariable%]

From https://www.palmtoppaper.com/ptphtml/43/43c00023.htm

The syntax for the command is TRUENAME filename or TRUENAME directory.

From https://www.robvanderwoude.com/truename.php

Syntax

TRUENAME [drive:][\path\][filename]

drive:\path\filename 	Specifies the drive, directory and/or file name of which the true name is to be displayed.
Default is the current drive and directory.
The file name does not necessarily have to exist.

TRUENAME will display "true" file names even if the files do not actually exist.

From http://thesystemmaster.com/dos7/z-truename.html

Syntax:

To display the full path (in short file name form) of a drive created with SUBST:
TRUENAME path

To display the full path (in short file name form) of the current directory of the current drive:
TRUENAME

To display a file and/or path (in short file name form) assigned to an environmental variable using SET:
TRUENAME %envirovariable%

You may also wish to look at:

  1. https://sites.google.com/site/pcdosretro/commands#TOC-TRUENAME
  2. https://books.google.de/books?id=LVCsAZClkfUC&lpg=PT502&ots=SEexXOHQld&dq=dos%20truename%20command&pg=PT502#v=onepage&q=dos%20truename%20command&f=false
  3. https://books.google.de/books?id=E9TvMcu1mIwC&lpg=PA312&ots=t9w5b3NaKe&dq=dos%20truename%20command&pg=PA312#v=onepage&q=dos%20truename%20command&f=false
  4. https://en.wikibooks.org/wiki/First_steps_towards_system_programming_under_MS-DOS_7/Internal_commands#3.29_TRUENAME_%E2%80%93_canonical_form_for_path_and_name
2022-03-08 06:11 Updated by: mateuszviste
Comment

so no switches, and the only argument is a string that is converted to a (possibly non-existing) path.

Implemented in revision 1045. I wonder what the use case for this command is.

2022-03-09 00:14 Updated by: bttr
Comment

Reply To mateuszviste

so no switches, and the only argument is a string that is converted to a (possibly non-existing) path.

I noticed TRUENAME help screen is probably inaccurate, because even the filename is optional. So, it should be in []?

Implemented in revision 1045. I wonder what the use case for this command is.

I successfully built a new SvarCOM binary to test this on my system and I think, it does its job fine. :-)

Apropos: Is there a way to tell OW not to display these messages on every run:

Open Watcom Make Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
No, '-s silent mode' is not the solution.

Maybe some env var? Before I dig out my hex-editor and replace the initial 'O' with 0x00...

Regarding the use case:

  1. That might be the reason it is undocumented. ;-)
  2. There is https://www.robvanderwoude.com/files/which_dos.txt -- But it doesn't work, because FOR IN (...) is not support or not handled correctly in SvarCOM. I had no problems with MS-DOS 5.0.
2022-03-09 00:38 Updated by: bttr
Comment

Reply To bttr

I noticed TRUENAME help screen is probably inaccurate, because even the filename is optional. So, it should be in []?

Fix in commit 1051.

2022-03-09 01:26 Updated by: mateuszviste
Comment

about for: problem here is the separator. MSDOS help says that arguments are space separated, and that's what svarcom supports... but apparently ";" works in MSDOS as well. Feel free to report it through a separate issue, providing the list of separators that are accepted by MSDOS (I can't find this information easily)

2022-03-09 04:28 Updated by: bttr
Comment

Reply To mateuszviste

about for: problem here is the separator. MSDOS help says that arguments are space separated, and that's what svarcom supports... but apparently ";" works in MSDOS as well. Feel free to report it through a separate issue, providing the list of separators that are accepted by MSDOS (I can't find this information easily)

New ticket: FOR %%A IN () broken

2022-03-13 22:57 Updated by: bttr
  • Status Update from Open to Closed
  • Resolution Update from None to Fixed
Comment

Enhancement became part of SvarCOM version 2022.3.

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login