Is @AltName working correctly?

May 24, 2010
855
0
Northlake, Il
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]
 
May 24, 2010
855
0
Northlake, Il
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
605
15
Norman, OK
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
 
May 24, 2010
855
0
Northlake, Il
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
605
15
Norman, OK
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).
 
May 20, 2008
603
0
Sammamish, WA
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).
 
May 20, 2008
11,547
107
Syracuse, NY, USA
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.
 
Jan 19, 2011
605
15
Norman, OK
Huh? A counter-example is the classic proof of falsehood.

I know, I meant one of those long, drawn out, boring, given this, assuming that kind of proofs.
 
Similar threads
Thread starter Title Forum Replies Date
P PSHELL not working in TCC 26 Support 9
H @XMLXPATH not working in v28 Support 5
twaterloo FolderMonitor for the 1st time not working Support 5
Tim Rowe NTFS Descriptions not working Support 13
J Batcomp still not working for me in TCMD27 Support 1
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
M Why did BEEP just quit working? Support 12
cgunhouse SETLOCAL not working in BDEBUGGER Support 9
nickles ANSI Colors Windows 7 no longer working Support 6
K ANSI Not Working Support 8
thorntonpg option /u not working The directory name is invalid Support 5
Charles Dye Is the "File Associations" installer dialog working? Support 4
H @ceiling @floor @int not working version 21.01.63 Support 9
K Command Line Selection Not Working Support 12
G Extended directory search not working Support 4
B %@fileseek is not working ? Support 2
C "Take Command has stopped working" Support 1
H New command not working well in Windows 7 Support 4
C "TakeCommand has stopped working" Support 3
N ping DNS lookup not working Support 1
N Updater/silentall not working? Support 1
K Help Not Working Support 11
R Fixed set /r has stopped working in build 35 Support 4
U Keys and IDX not working Support 11
Jesse Heines How to? Everything Tool Not Working After Version 20 Installation Support 8
WavSlave Fixed LIST /U not working in TCC v19 Support 5
Jay Sage %_selected no longer working Support 15
S iftp copying pgp files from ftp is not working Support 11
fishman@panix.com Extended Directory Searches are not working for me in CDD Support 9
J How to set working directory Support 10
vefatica Fixed LEAVE N not working Support 7
P %date5 not working Support 6
M WAD PDir not working correctly... Support 5
Detlef Fixed ParameterChar in TCMD.INI no longer working Support 35
Jay Sage WAD Variable _LOGFILE Not Working Support 2
I v16 - Shortcuts not working Support 6
rps Fixed Win "set /p" not working in V17 build 53 Support 3
Jay Sage Toolbar Update to INI File Not Working Support 10
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4
Jay Sage Unknown_CMD Not Working Support 4
fromano Fixed /E not working in TCMD 17.0.40 while doing one way synch Support 1
R WAD Copy's command dialogue not working Support 2
C WAD @index not working in v16 x64 Support 14
Dan Glynhampton Fixed @version "force" flag not working, and unable to set separator Support 3
C RSS feed subscription not working Support 9
M @Index not working like I thought it would... Support 2
C Working with links Support 6
C Move /MD not always working Support 1
C Startup folder not working on v15 Support 6
T Documentation Comspec not working Support 3

Similar threads