WAD Executing rename.py -y trigger internal rename command

Sep 20, 2015
3
0
#1
Hi,

Executing

> rename.py -y

triggers the internal rename command (i.e. trying to rename ".y" to "-y") which results in "TCC: (Sys) The system cannot find the file specified." message.

I expect it to run the script rename.py in the current directory with -y as parameter, since there is no space between "rename" and ".py".
 

rconn

Administrator
Staff member
May 14, 2008
10,770
97
#2
Executing

> rename.py -y

triggers the internal rename command (i.e. trying to rename ".y" to "-y") which results in "TCC: (Sys) The system cannot find the file specified." message.

I expect it to run the script rename.py in the current directory with -y as parameter, since there is no space between "rename" and ".py".
WAD - this is a CMD-compatibility issue. CMD does not require a space after an internal command name (i.e., "echo.", "dir\", etc.).

To force TCC/LE to use the script, enter:

Code:
.\rename.py -y
 
Sep 20, 2015
3
0
#3
Except it works fine with cmd.exe without using "\.".

cmd.exe> rename.py -h
usage: rename.py [-h] [-y]

optional arguments:
-h, --help show this help message and exit
-y, --yes

tcc.exe> rename.py -h
TCC: (Sys) The system cannot find the file specified.
"C:\.py"
0 files renamed

Also TCC/LE behavior is inconsistent since running

> rename.py

runs the "rename.py" script while

> rename. py -y

runs the internal rename command.
 
Sep 20, 2015
3
0
#5
Thanks, "setdos /i-rename" does the trick :smile:.

I still think that to be cmd.exe compatible, tcc/le need to give external command a priority over internal command when the command ".extension" is given in the command line.