@echo off if "%1"=="" goto ERRO if NOT "%2"=="" goto ERRO set NOVO_URL=%1 echo WARNING: this batch prorgam is going to modify all files called "Root" in the current folder and subfolders to point to the CVSROOT "%NOVO_URL%". pause rem Search all files called "Root" in the whole tree. rem It tests for the "real" existance of the file because oddly it returns an extra "ghost" reference appended with '\Root'. (Maybe some '.' directory oddity?) for /R %%A in (Root) do if EXIST "%%~fA" (echo %NOVO_URL%> %%~fA) goto FIM :ERRO echo Syntax: changeCVSROOT.bat NEW_CVSROOT echo "" echo Alternatively you can edit this batch directly. (Oh, really? ;) echo WARNING: the program must be run from the root of the sandbox you want to change! pause goto FIM :FIM