R
Ray at
Hi group,
Can anyone tell me how to replace a piece of a string with another piece of
a string within a variable? For example:
SET X=C:\Ray\path
[command to do replace "Ray" with "Joe" in %X%]
ECHO X
Yeilds: C:\Joe\Path
(The "Ray" and "Joe" values will be hard-coded into my .bat file.)
In searching, I found this article:
http://groups.google.com/groups?threadm=04b901c2c2f7$192549e0$89f82ecf@TK2MSFTNGXA01
That appears that it'll work after I filter out all the file operations
steps, as I'm not concerned with replacing text in a file. But, I suspect
there would be a different way to do it that isn't as complex. If not, I
can probably piece something together with what I'm reading in tips 4194 and
5700 at jsiinc.com.
Thank you,
Ray at work
Can anyone tell me how to replace a piece of a string with another piece of
a string within a variable? For example:
SET X=C:\Ray\path
[command to do replace "Ray" with "Joe" in %X%]
ECHO X
Yeilds: C:\Joe\Path
(The "Ray" and "Joe" values will be hard-coded into my .bat file.)
In searching, I found this article:
http://groups.google.com/groups?threadm=04b901c2c2f7$192549e0$89f82ecf@TK2MSFTNGXA01
That appears that it'll work after I filter out all the file operations
steps, as I'm not concerned with replacing text in a file. But, I suspect
there would be a different way to do it that isn't as complex. If not, I
can probably piece something together with what I'm reading in tips 4194 and
5700 at jsiinc.com.
Thank you,
Ray at work