- Jun
- 762
- 16
For file renames that change only the case of the name, RENAME throws an error message when the /N switch is included.
Without the /N switch, it performs the operation that changes the case.
This is a real error, not just a reporting peculiarity, as I noted in the thread about the DIR command and regular expressions.
TCC(30.00.18): C:\temp\sandbox>dirx & *rename /n B b & dirx
1
2
A
a b
B
C:\temp\sandbox\B -> C:\temp\sandbox\b
TCC: (Sys) Cannot create a file when that file already exists.
"C:\temp\sandbox\b"
0 files would be renamed
1
2
A
a b
B
Without the /N switch, it performs the operation that changes the case.
TCC(30.00.18): C:\temp\sandbox>dirx & *rename B b & dirx
1
2
A
a b
B
C:\temp\sandbox\B -> C:\temp\sandbox\b
1 file renamed
1
2
A
a b
b
This is a real error, not just a reporting peculiarity, as I noted in the thread about the DIR command and regular expressions.