... vs ..\.. inside parameters

Jun 8, 2013
98
0
Warsaw, Poland
I'm not sure if it is an issue:

echo %@IniRead["Z:\P Apps\PortableApps\TccLePortable\App\32\..\..\TccLePortable.ini",Command,Force32]
true

echo %@IniRead["Z:\P Apps\PortableApps\TccLePortable\App\32\...\TccLePortable.ini",Command,Force32]
ECHO is OFF

---- both arguments are the same:
truename "Z:\P Apps\PortableApps\TccLePortable\App\32\...\TccLePortable.ini"
Z:\P Apps\PortableApps\TccLePortable\TccLePortable.ini

truename "Z:\P Apps\PortableApps\TccLePortable\App\32\..\..\TccLePortable.ini"
Z:\P Apps\PortableApps\TccLePortable\TccLePortable.ini

-----
TCC LE 13.06.77 Windows 7 [Version 6.1.7601]
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,398
83
Albuquerque, NM
prospero.unm.edu
Code:
C:\>truename shell:
c:\BIN\TCmd16

C:\>echo %@iniread[c:\bin\tcmd16\TCmd.ini,4nt,appendtodir]
Yes

C:\>echo %@iniread[shell:TCmd.ini,4nt,appendtodir]
ECHO is OFF

C:\>

@INIREAD does not canonicalize its filename argument. Which makes sense when you consider its unusual behavior, documented in the help file: when no path is specified, the file is assumed to be in the Windows directory, not the current directory.
 
May 20, 2008
11,192
94
Syracuse, NY, USA
What is "shell:"? And,though I don't even know what it means, your example, Charles, looks like it needs a '\'.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,398
83
Albuquerque, NM
prospero.unm.edu
What is "shell:"? And,though I don't even know what it means, your example, Charles, looks like it needs a '\'.

It's a directory alias. And while TRUENAME doesn't display it in the example above, there is indeed a backslash in there:

Code:
C:\>which shell:
shell: is an alias : %@path[%_cmdspec]

C:\>truename shell:
c:\BIN\TCmd16

C:\>truename shell:*
c:\BIN\TCmd16\*

C:\>

If you want the filename canonicalized, you must do it yourself with @TRUENAME:

Code:
echo %@IniRead[%@truename["Z:\P Apps\PortableApps\TccLePortable\App\32\...\TccLePortable.ini"],Command,Force32]
echo %@iniread[%@truename[shell:TCmd.ini],4nt,appendtodir]