Creating script to process RC for multiple folders in sequence

I have tried the script you suggested, with the changes pertaining to my own RC process. It looks like this:

for /D %%f in ("%RootFolder%*") do ^ (
::echo Processing folder:: '%%f'^
     
"C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe" ^
-save "%~dp0Reality Capture\Project.rcproj" ^
-addFolder "%%f\Processing" ^
-detectMarkers ^
-importGroundControlPoints "%~dp0DetectPositions.txt" ^
-align ^
-save ^
-selectMaximalComponent ^
-setReconstructionRegion "%~dp0forCutFACS.rcbox" ^
-calculateHighModel ^
-save ^
-selectLargestModelComponent ^
-invertTrianglesSelection ^
-removeSelectedTriangles ^
-renameSelectedModel "Unedited" ^
-exportSelectedModel "%~dp0\Harlander\Harlander_Unedited.obj" ^
-save

)

Some immediate issues:

I have noticed in the command prompt window I am seeing this:

D:\Processing> (
’ ’ is not recognized as an internal or external command,
operable program or batch file.

In Reality Capture, the operation is failing on finding images.