0
当我确定我的约会输出包含空格:摆脱空间
set thedateis=20/10/2017
for /F "tokens=1,2,3 delims=/" %%a in ('echo %thedateis%') do set day=%%a & set month=%%b & set year=%%c
echo The chosen date is: %thedateis%, Day:.%day%., Month:.%month%., Year:.%year%.
它给了我
The chosen date is: 20/10/2017, Day:.20 ., Month:.10 ., Year:.2017.
我怎样才能摆脱空间的?
你需要还是学习的最佳实践经验,使用下面的符号:'设置“ thedateis = 11/12/2017“','Set”day = %% a“','Set”month = %% b“'和'Set”year = %% c“'。 – Compo