I have a command line build runner in Teamcity that runs the following custom script:
FOR /f "delims=" %%i IN ('dir /ad /b "D:\CRC Releases"') do @rd /q /s "D:\CRC Releases\%%i"
However I get the following error:
\CRC was unexpected at this time
Is there anything wrong with the syntax of the script? Please note that when I trigger this directly via the command prompt (with single %) it works just fine. Any help will be appreciated.
For some reason the forementioned script is really not working so I decided to use the script below instead:
FOR /D %%p IN ("D:\CRC Releases\*.*") DO rmdir "%%p" /s /q
I triggered this as an executable file in Teamcity and it did the job. Thank you for everyone who helped me with this issue.