Welcome!

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

SignUp Now!

Problem with CALL and Directory Aliases in V17

Dec
231
2
There seems to be a problem with “Directory Aliases” in version 17.

I have the following:
set jps=c:\jpsoft\startup
alias jps:=%jps


In version 16:

dir jps: and dir jps:\

Volume in drive C is unlabeled Serial number is 7a68:cdf3
Directory of C:\JPSoft\StartUp\*
10/27/2014 7:59 <DIR> .
10/27/2014 7:59 <DIR> ..
9/30/2014 10:34 4,573 aliases.ini
9/12/2014 15:31 979 arclog.btm
2/13/2014 16:08 23,465 assoc.ini
2/13/2014 16:13 45,253 associate.ini
3/03/2014 10:52 577 dir.ini
12/06/2012 10:45 4,622 directorydif.txt
9/12/2014 14:31 2,857 eKHR.ini
9/19/2014 15:26 964 eKHRaliases.ini
11/29/2012 11:46 44 ftp.cfg
2/13/2014 9:13 66,325 ftype.ini
4/23/2014 8:46 688 function.ini
2/19/2014 13:09 54 jabber.btm
9/11/2014 8:12 252 monthjobs.btm
9/11/2014 8:43 278 monthlogbackup.btm
9/18/2014 8:49 2,121 Set.ini
10/27/2014 7:36 1,400 tcstart.btm
11/24/2009 14:26 89 USBConnect.btm
11/24/2009 13:30 113 USBDisconnect.btm
2/13/2014 16:12 237 user_assoc.ini
2/13/2014 16:15 665 user_associate.ini
2/13/2014 16:11 1,735 user_ftype.ini
157,291 bytes in 21 files and 2 dirs 225,280 bytes allocated
302,236,966,912 bytes free

Version 17 is identical

But when executing the following:

Call jps:\monthjobs.btm

Version 16, executes with no problems but version 17 produces:

[16] (4366264K) c:\jpsoft\startup > call jps:\monthjobs.btm
TCC: (Sys) The directory name is invalid.
"C:\JPSoft\StartUp:\monthjobs.btm"

The colon, “:”, wasn’t removed during the parsing and reconstruction of the final command line to be execute.
 
"jps:" is contained in a file called dir.ini and defined in that file with the line:

jps:=%jps

and dir.ini is load with:

alias /r "c:\jpsoft\startup\dir.ini"

%jps is contained in file called set.ini and defined in that file with the line:

jpS=C:\JPSoft\StartUp

and set.ini is load with:

set /r "C:\jpsoft\startup\Set.ini"
 
I can't repro it.
Code:
v:\> copy avtemp.btm c:\Users\vefatica\
V:\avtemp.btm => C:\Users\vefatica\avtemp.btm
  1 file copied

v:\> set jps=c:\Users\vefatica\

v:\> alias jps:=%jps

v:\> alias jps:
c:\Users\vefatica\

v:\> call jps:avtemp.btm
(It works!)
v:\> call jps:\avtemp.btm
(It works!)
 
It has to something to do with the alias:

jps=pushd %jps

(no colon after the jps)

in file aliases.ini and loaded with

alias /r "C:\jpsoft\startup\aliases.ini"


I tried the following just from the command line:

c:\jpsoft\startup > set js=C:\JPSoft\StartUp
c:\jpsoft\startup > alias js:=%js
c:\jpsoft\startup > alias js=pushd %js
c:\jpsoft\startup > call js:\monthjobs.btm

and resulted in:

TCC: (Sys) The directory name is invalid.
"C:\JPSoft\StartUp:\monthjobs.btm"
 
Strangely in version 16.03.55 x64
with the following predefined

set jps=C:\JPSoft\StartUp
alias jps:=%jps
alias jps=pushd %jps


jps:\monthjobs.btm
(works)

jps:monthjobs.btm
does not work and gives the error:
TCC: Unknown command "C:\JPSoft\StartUpmonthjobs.btm"

seems that without the \ after the colon the directory alias is not used.
 
The "jps:" and "jps" alias were add at a different time to my list of aliases. Since it worked, I assumed that the command processor parsed "jps" and " jps:" correctly but it appears that only "jps:\" is parsed correctly in V16 and in V17 neither is parsed correctly. This also means that there has been a change to how the command line is parsed between V16 and V17.

I guess I need to drop the "jps" alias.
 
Last edited:
The "jps:" and "jps" alias were add at a different time to my list of aliases. Since it worked, I assumed that the command processor parsed "jps" and " jps:" correctly but it appears that only "jps:\" is parsed correctly in V16 and in V17 neither is parsed correctly. This also means that there has been a change to how the command line is parsed between V16 and V17.

About 98% of the command line parsing was changed between v16 and v17. A lot of inconsistencies were removed, previously uncaught errors are now caught, and everything is faster (and smaller).
 
jps:monthjobs.btm
does not work and gives the error:
TCC: Unknown command "C:\JPSoft\StartUpmonthjobs.btm"

seems that without the \ after the colon the directory alias is not used.

WAD (and the directory alias *is* used) -- directory alias substitution doesn't append a \ onto the aliased directory name; that's your responsibility. Either put it in the alias definition or on the command line.
 

Similar threads

Back
Top