Welcome!

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

SignUp Now!

@replace -- what is wrong here

Aug
5
0
This is a slightly cleaned up printout from the screen:
--------------------------------------------------------------------------
s:\x>ver
TCC 24.00.24 x64 Windows 10 [Version 10.0.17134.471]

s:\x>dir
...
12/11/2018 14:46 5,047,695 IMG_1981.JPG
12/11/2018 14:47 5,220,796 IMG_1982.JPG
12/11/2018 14:47 4,889,711 IMG_1983.JPG
..

s:\x>for %f in (img*) echo %@replace[img,xyz,%f]
IMG_1981.JPG
IMG_1982.JPG
IMG_1983.JPG

s:\x>for %f in (img*) echo %@replace[img,xyz,img_123]
xyz_123
xyz_123
xyz_123
--------------------------------------------

Why @replace in the first 'for' didn't replace 'img' with 'xyz' ?
It worked in the second 'for' command for the constant string.
The first 'for' listed all img* files, so we know that '%f' is being expanded, but @replace didn't do its job.

Am I doing something wrong here?

Thanks,
Tom
 

Similar threads

Back
Top