cl doesn't let you do this, but if you want to compile all C files in every folder starting from a certain point, then you can do something like the following.
Note, with those command options you can't pass in a header file either.
@echo off
set USAGE=Usage: %~n0 "C:\Existent Start Dir"
if %1xx == xx ( echo %USAGE% & exit /b 2 )
if not exist "%~1" ( echo %USAGE% & exit /b 1 )
for /r "%~dpn1" %%f in (.) do (
pushd %%f
if exist *.c (
echo *** Compiling C files in %%f ***
call cl -GL -Od -Zi *.c
echo.
)
popd
)
Test this with:
test.cmd C:\mytest
If C:\mytest contains several folders of simple *.c and *.h files this will work.
test.cmd C:\mytest
You might really be wanting to invoke nmake?