How to? Use regular expression with REN?

Oct 20, 2017
28
0
Netherlands
I read on page 522 of the userguide that REN supports regular expression. The syntax is: REN ::filename ::target.

Question: Can you give me syntax examples how to use regular expression with REN?

Thanks,

Marcel
 
Jan 19, 2011
596
14
Norman, OK
Code:
[C:\temp]
15:13:59 $ touch /c filename1.txt filename2.txt filename3.txt
2020-06-22 15:14:12.466  C:\temp\filename1.txt
2020-06-22 15:14:12.466  C:\temp\filename2.txt
2020-06-22 15:14:12.466  C:\temp\filename3.txt

[C:\temp]
15:14:12 $ ren ::(file).+([1-3])\.txt ::\1t-o-fish\2.txt

[C:\temp]
15:14:24 $ dir fil*

 Volume in drive C is Windows        Serial number is 9ab9:c55a
 Directory of  C:\temp\fil*

2020-06-22  15:14               0  filet-o-fish1.txt
2020-06-22  15:14               0  filet-o-fish2.txt
2020-06-22  15:14               0  filet-o-fish3.txt
                 0 bytes in 3 files and 0 dirs
   325,317,332,992 bytes free