Is @AltName working correctly?

#1
Very simple:

[Z:\]dir sample.txt /k /m
TCC: (Sys) The system cannot find the file specified.
"Z:\sample.txt"

[Z:\]Echo %@AltName[sample.txt]
Z:\sample.txt

And documentation for @AltName says (and I quote): "If the file does not exist, returns an empty string."

TCC 12.11.76 Windows 7 [Version 6.1.7601]
 
#3
It seems that the sentence before in the Help takes precedence: "If the file name is already in 8.3 format, returns the file name. If the file does not exist, returns an empty string."
David, it would seem that you are correct, although I certainly wouldn't have expected that. However, there are several possible and easy workarounds for the issue. Thank you!!!
 
Jan 19, 2011
573
8
Norman, OK
#4
It seems that the sentence before in the Help takes precedence: "If the filename is already in 8.3 format, returns the filename. If the file does not exist, returns an empty string."
How about this then?

HTML:
[C:\temp]
12:49:06 $ dir name_not_in_8.3_format.txt /k /m
TCC: (Sys) The system cannot find the file specified.
 "C:\temp\name_not_in_8.3_format.txt"

[C:\temp]
12:49:56 $ echo %@AltName[name_not_in_8.3_format.txt]
C:\temp\name_not_in_8.3_format.txt
 
#5
How about this then?

HTML:
[C:\temp]
12:49:06 $ dir name_not_in_8.3_format.txt /k /m
TCC: (Sys) The system cannot find the file specified.
 "C:\temp\name_not_in_8.3_format.txt"

[C:\temp]
12:49:56 $ echo %@AltName[name_not_in_8.3_format.txt]
C:\temp\name_not_in_8.3_format.txt
John, am I wrong, or have you effectively just proved that the statement "If the file does not exist, returns an empty string." is false?
 
Jan 19, 2011
573
8
Norman, OK
#6
John, am I wrong, or have you effectively just proved that the statement "If the file does not exist, returns an empty string." is false?
I didn't prove anything; I just provided a counter-example (too many years of discrete mathematics and calculus make me provide that distinction).
 
#8
From my own testing, it seems that a file which does not exist is returned as-is. If the file does exist, it returns the SFN of the file and path, if one is included in the string.-- Sent from my HP TouchPadOn Nov 8, 2011 13:38, JohnQSmith <> wrote: ---Quote (Originally by mathewsdw)---
John, am I wrong, or have you effectively just proved that the statement "If the file does not exist, returns an empty string." is false?
---End Quote---
I didn't prove anything; I just provided a counter-example (too many years of discrete mathematics and calculus make me provide that distinction).
 
#9
On Tue, 08 Nov 2011 16:38:52 -0500, JohnQSmith <> wrote:

|---Quote (Originally by mathewsdw)---
|John, am I wrong, or have you effectively just proved that the statement "If the file does not exist, returns an empty string." is false?
|---End Quote---
|I didn't prove anything; I just provided a counter-example (too many years of discrete mathematics and calculus make me provide that distinction).

Huh? A counter-example is the classic proof of falsehood.