@if TRICK==%1TRICK goto advice
@if TRICK==%3TRICK goto nomore
@if exist phpcmdparams-are.here* erase phpcmdparams-are.here*
@for %%i in (%1) do @echo %%i>> phpcmdparams-are.here1
@echo %2> phpcmdparams-are.here2
@echo %3> phpcmdparams-are.here3
@if TRICK==%4TRICK goto doit 
@echo %4> phpcmdparams-are.here4
@if TRICK==%5TRICK goto doit 
@echo %5> phpcmdparams-are.here5
@if '-nTRICK'=='%2TRICK' goto lesstodo
@for %%i in (%1) do str_replace.php %%i %2 %3 %4 %5
@goto nomore
:doit
@if '-nTRICK'=='%2TRICK' goto lesstodo
@for %%i in (%1) do str_replace.php %%i %2 %3 > %%i.out

@goto nomore
:lesstodo
@for %%i in (%1) do str_replace.php %%i %2 %3 %4 %5

@goto nomore
:advice
@echo Usage for str_replace (replace strings in files) ...
@echo Output results to screen ..." 
@echo %0 [infilespec] -n "[fromstr]" "[tostr]" 
@echo Output results to [infile].out ..." 
@echo %0 [infilespec] "[fromstr]" "[tostr]" 
@echo Append output results to [outfile] ..." 
@echo %0 [infilespec] -a [outfile] "[fromstr]" "[tostr]" 
@echo Write output results to [outfile] ..." 
@echo %0 [infilespec] -w [outfile] "[fromstr]" "[tostr]" 
:nomore

