I am trying to implement the following custom build step using the "Command Line" build step option. I have defined a "Configuration Parameter" named "mydir" that should be evaluated by TeamCity but the remainder of the "%" symbols need to be left alone.
del /q "%mydir%\*"
for /d %%x in ("%mydir%\*") do @rd /s /q ^"%x^"
I cannot figure out how to properly escape the "%" characters in order to get the output expected above. I have tried numerous combinations but they always fail to evaluate properly. Any help would be greatly appreciated.