I created an automated build process which facilitated the creation of incremental and frequent builds. The process requests the package name from the user. In my case, the convention is Test Candidate number, which is abbreviated as TC[number].

However over time, I found myself deleting previous TC folders manually. I needed to incorporate this step into the build process.

I was presented with the Windows way or the GnuWin32 way.

Windows Way: (form this forum)

for /f "tokens=* delims= " %a in ('dir/b/ad ^| find "TC"') do (rd /s /q %a)


GnuWin32 Way: (from GnuWin32)

"%ProgramFiles%\GnuWin32\bin\rm.exe" -v -r -d -f TC*


Which seems like it would be easier for someone else to understand? I chose the GnuWin32 way.