且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

批处理-搜索变量是否包含空格

更新时间:2023-11-27 11:43:40

此操作应根据您的需要:双引号始终是空格和其他一些字符的解决方案.

This should do as you need: double quotes are always the solution for spaces, and also with some other characters.

if not "%VAR%"=="%VAR: =%" exit 1