Thank you both for your replies and suggestions. I got some interesting results!

@RogerB according to the help file included with TCC/LE, in the section "Comparing TCC and TCC/LE", it says:

"TCC/LE does include the full command line editing, alias, filename completion, directory navigation, file selection, and

**regular expression** support in TCC."

However, it also states that TCC/LE does not support Perl, Python, REXX, Ruby or Tcl/tk, so it's a little unclear exactly which regex syntax it does support!

When I tried your regex suggestion, I got this result:

Code:

```
D:\TempWork\tcc>dir /b
kb67x eagt1g prc base 001.kg1
kb67x eagt1g prc base 002.kg1
kb67x eagt1g prc base 003.kg1
kb67x eagt1g prc base 004.kg1
kb67x eagt1g prc base 005.kg1
kb67x l33brm prc base 001.kl1
kb67x l33brm prc base 002.kl1
kb67x l33brm prc base 003.kl1
D:\TempWork\tcc>rename ::"(kb67x )l33brm(.*)" ::"\1lot33\2"
D:\TempWork\tcc\kb67x l33brm prc base 001.kl1 -> D:\TempWork\tcc\lot33kb67x
D:\TempWork\tcc\kb67x l33brm prc base 002.kl1 -> D:\TempWork\tcc\lot33kb67x
TCC: (Sys) Cannot create a file when that file already exists.
"D:\TempWork\tcc\kb67x l33brm prc base 002.kl1"
D:\TempWork\tcc\kb67x l33brm prc base 003.kl1 -> D:\TempWork\tcc\lot33kb67x
TCC: (Sys) Cannot create a file when that file already exists.
"D:\TempWork\tcc\kb67x l33brm prc base 003.kl1"
1 file renamed 2 failed
D:\TempWork\tcc>dir /b
lot33kb67x
kb67x eagt1g prc base 001.kg1
kb67x eagt1g prc base 002.kg1
kb67x eagt1g prc base 003.kg1
kb67x eagt1g prc base 004.kg1
kb67x eagt1g prc base 005.kg1
kb67x l33brm prc base 002.kl1
kb67x l33brm prc base 003.kl1
```

So it seems that there might be a problem with back references in TCC/LE.

@vefatica your solution worked perfectly! I checked in the help file that the @replace function is included in TCC/LE, and it is. So I tried it:

Code:

```
D:\TempWork\tcc>dir /b
kb67x eagt1g prc base 001.kg1
kb67x eagt1g prc base 002.kg1
kb67x eagt1g prc base 003.kg1
kb67x eagt1g prc base 004.kg1
kb67x eagt1g prc base 005.kg1
kb67x l33brm prc base 001.kl1
kb67x l33brm prc base 002.kl1
kb67x l33brm prc base 003.kl1
D:\TempWork\tcc>do f in "kb67x l33brm prc base *.kl1" (ren "%f" "%@replace[l33brm,lot33,%f]")
D:\TempWork\tcc\kb67x l33brm prc base 001.kl1 -> D:\TempWork\tcc\kb67x lot33 prc base 001.kl1
1 file renamed
D:\TempWork\tcc\kb67x l33brm prc base 002.kl1 -> D:\TempWork\tcc\kb67x lot33 prc base 002.kl1
1 file renamed
D:\TempWork\tcc\kb67x l33brm prc base 003.kl1 -> D:\TempWork\tcc\kb67x lot33 prc base 003.kl1
1 file renamed
D:\TempWork\tcc>dir /b
kb67x eagt1g prc base 001.kg1
kb67x eagt1g prc base 002.kg1
kb67x eagt1g prc base 003.kg1
kb67x eagt1g prc base 004.kg1
kb67x eagt1g prc base 005.kg1
kb67x lot33 prc base 001.kl1
kb67x lot33 prc base 002.kl1
kb67x lot33 prc base 003.kl1
```

If I had a large chocolate chip cookie to hand out as a prize, it would be on its way right now, but sadly my cupboard is empty!