Again, I'm struggling with Batch files on windows, and again I hope you can help me again. I don't understand a thing of it ;)
I now have the following code that prints the name of the underlying directories when the directory contains 'R1' in its name.:
FOR /d %%d in (directory\*R1*) do (
SET x=%%d && echo %x%)
I now have the directory name as a string, set in 'x'. I want to split this string on the \ and get the last item. Then I want to replace 'R1' with 'R2' in that last item. Can anyone make a function for me that works? I'm lost.
Thanks.