Welcome!

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

SignUp Now!

WAD Executing rename.py -y trigger internal rename command

Sep
3
0
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".
 
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
 
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.
 
There are a number of ways you could deal with this. Perhaps the simplest is to just
Code:
setdos /i-rename

Nobody ever uses RENAME, right? When REN does the exact same thing?
 
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.
 
Back
Top