@echo off
set abc=123
set /p xx=enter:
set "xx=%xx:"=%"
echo %xx%
pause
The meaning of the code 【set "xx=%xx:"=%"】 is to filter out the 【quotation marks】
If you enter at : %abc%
the execution result of the code is to display ——
But now I need to filter out the 【percent signs】
That is, I want the execution result to become displaying on the screen, in other words, the percent signs in the previously entered line %abc% are deleted
So I modified the code like this —— set "xx=%xx:%=%"
But it gave an error, so how should I do it to filter out the 【percent signs】
I hope everyone can help me, thanks
[ Last edited by kuixuan on 2010-7-1 at 15:58 ]
set abc=123
set /p xx=enter:
set "xx=%xx:"=%"
echo %xx%
pause
The meaning of the code 【set "xx=%xx:"=%"】 is to filter out the 【quotation marks】
If you enter at : %abc%
the execution result of the code is to display ——
But now I need to filter out the 【percent signs】
That is, I want the execution result to become displaying on the screen, in other words, the percent signs in the previously entered line %abc% are deleted
So I modified the code like this —— set "xx=%xx:%=%"
But it gave an error, so how should I do it to filter out the 【percent signs】
I hope everyone can help me, thanks
[ Last edited by kuixuan on 2010-7-1 at 15:58 ]

