@ECHO OFF for /D %%f in (c:\visu2000\*.*) do for %%g in (%%f\*.ocx) do regsvr32 /s %%g for /D %%f in (c:\visu2000\*.*) do for /D %%g in (%%f\*.*) do for %%h in (%%g\*.ocx) do regsvr32 /s %%h