Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

... vs ..\.. inside parameters

Jun
98
0
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]
 
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.
 
What is "shell:"? And,though I don't even know what it means, your example, Charles, looks like it needs a '\'.
 
Quite simply, it looks like @INIREAD doesn't understand "...".
 
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]
 
Back
Top