REN bug

Jun 24, 2008
223
0
Siegen, Germany
Using version 12.10-0.58 and trying to execute the below commands:

mkdir x
ren x "x [y]"


I receive the following error message:

TCC: (Sys) The system cannot find the file specified.
"E:\temp\down\x"


This doesn't happen for plain files:

> x
ren x "x [y]"


E:\temp\down\x -> E:\temp\down\x [y]
1 file renamed


nickles
 
May 20, 2008
11,424
99
Syracuse, NY, USA
See REN's "/S" option. Apparently it's seeing "[x]" as a wildcard.


On Sun, 27 Mar 2011 14:25:21 -0400, nickles <> wrote:

|Using version 12.10-0.58 and trying to execute the below commands:
|
|mkdir x
|ren x "x [y]"
|
|I receive the following error message:
|
|TCC: (Sys) The system cannot find the file specified.
| "E:\temp\down\x"
|
|This doesn't happen for plain files:
|
|> x
|ren x "x [y]"
|
|E:\temp\down\x -> E:\temp\down\x [y]
| 1 file renamed
|
|nickles
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
> Which it shouldn't (as it isn't). It used to work in prior versions!

Not in anything recent -- that code hasn't changed in at least a couple of
years. REN has *always* required a /S to rename directories, though
sometimes (but only recently) it is able to guess that you're trying to
rename a directory.

There's no way for the parser to automagically know whether you want []
characters to be wildcards or literal characters. See the help for REN when
renaming directories to targets with wildcards.

Rex Conn
JP Software
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
On the other hand, bracket wildcards make no sense in REN's new_name parm anyway. Maybe COPY's target filename too, and a few other places? Perhaps in some future version, these commands could check only for simple wildcards (question marks and asterisks) in target parameters?
 
Jun 24, 2008
223
0
Siegen, Germany
move works w/o problems.

Also, the behavior is inconsistent with renaming files (see first post).
Also - as I've used this exact syntax quite often before - I'm pretty sure (not keeping old versions) that it worked before 12.10.

nickles
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
move works w/o problems.

Also, the behavior is inconsistent with renaming files (see first post).
Also - as I've used this exact syntax quite often before - I'm pretty sure (not keeping old versions) that it worked before 12.10.

I tried it back on versions to 8.0 and it didn't work (as expected) without the /S option on any of them.

I suspect that either you had an alias in the past, or you weren't using the square brackets.
 
Jun 24, 2008
223
0
Siegen, Germany
Also - because I used to rename files instead of directories - call me a blockhead ;-)

Sorry for that.

But - this behavior is not consistent with cmd and - from my point of view - generally "nasty" (as unexpected):

ren "some name" "some name [details]" would give my an error when being a directory, not however when being a file.
 

rconn

Administrator
Staff member
May 14, 2008
12,365
150
But - this behavior is not consistent with cmd and - from my point of view - generally "nasty" (as unexpected):

ren "some name" "some name [details]" would give my an error when being a directory, not however when being a file.

The only way to make it consistent with CMD would be to eliminate extended wildcards (which CMD doesn't support).
 
Jun 24, 2008
223
0
Siegen, Germany
@rconn

Move uses these too, doesn't it?

Maybe there should be a switch allowing us to turn on/off extended wildcards?

Is there a setdos option?

nickles
 
Similar threads
Thread starter Title Forum Replies Date
samintz WAD Weird REN bug Support 6
Jesse Heines Using Regular Expressions with the REN commanc Support 8
C Documentation Help Nit. REN / RENAME Support 0
D How to? Use regular expression with REN? Support 2
vefatica REN and NTFS streams? Support 3
samintz REN implied .* Support 2
F Regexes in REN/MOVE/… commands seem to not work at all Support 3
D How to? Wildcards as sets - looping issue with FOR and REN Support 7
S REN and FOR %a with files Support 8
Phileosophos ren /s does not process subdirectories Support 3
M Ren command confusion Support 13
S Strange REN problem - non-English characters Support 3
T REN a TCC Tab from command line Support 9
Dick Johnson v28 Cosmetic Bug Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
R strange bug? Support 7
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
M Server 2019 Bug with @execstr? Support 14
R bug _ypixels in BDEBUGGER Support 6
E Fixed Bug with DIR /Z displaying descriptions Support 8
E Text copy bug Support 1
x13 SETARRAY /Z bug Support 6
Gamegod ffind bug with chinese Support 2
Dick Johnson cdd - is this a bug or a feature? Support 7
P "Set" command behavior - a bug? Support 3
nikbackm TCC 20 variable expansion bug Support 6
gentzel Bug launching external commands in 20.11.43 Support 11
R Is this a bug in SETARRAY? Support 2
M Windows Installer bug? Support 4
vefatica @SCRIPT bug persists Support 4
M Little bug, big consequences .. Support 6
fishman@panix.com Once again the Can't Install bug bites... Support 2
gentzel Fixed dirs +n bug in 20.0.12 x64 Support 2
M Bug in Windows 10, when adding symbol to task bar Support 6
Alpengreis [Bug?] View (V) Prefs Error (TC 18.00.27 x64) Support 4
D WAD Minor Post Installation Bug in V18 Support 1
I Possible Bug: History /n Returns Nothing Support 3
Jay Sage WAD Possible Bug in Batch Parameters Support 7
G Bug? TCC 16.03.55 Console Palette Support 4
S Return of FTP copy bug in 16.02.48 Support 12
S XenForo bug Support 3
D TCMD16 Delete Toolbar Button bug Support 7
keithg1964 WAD 16.0027 Alias /rz bug Support 8
rfaquino WAD Apparently a bug when expanding environment variable %ProgramFiles(x86) Support 2
T Documentation @LINE[CON,n] @LINES[CON] not documented (bug?) Support 4
H TIMER bug Support 4
G Fixed @REREPLACE bug Support 15
G WAD PDIR @IF bug, @WORD bug Support 8
T Bug in TCMD but not in TCC Support 8
M WAD A complaint regarding a very irritating TCC installation behavior... (Bug?) Support 4

Similar threads