我想知道如何用其他2个变量设置变量。
我的代码:
@echo off
set str=the cat and the mouse and the car and the bull and the joker and the batman and some random guy
echo.%str%
set /p find=
set /p replace=
set str=%str:%find%=%replace%%
echo.%str%
pause
答案 0 :(得分:0)
@echo off
setlocal enableDelayedExpansion
set str=the cat and the mouse and the car and the bull and the joker and the batman and some random guy
echo.%str%
set /p find=
set /p replace=
set str=!str:%find%=%replace%!
echo.%str%
pause