P粉4632912482023-08-28 13:28:01
In my case, if I run the batch file using cmd and the batch file path is incorrect, this error will show up, like users>E:\TEST"E:\TEST.bat
Error, users>E:\TEST.bat
worked. After checking my path, it was fixed.
P粉1847475362023-08-28 11:15:29
set myPATH="C:\Users\DEB\Downloads.1.1.0.4" cd %myPATH%
Single quotes don't represent strings, they make it start with: 'C:\
instead of C:\
so
%name%
is a common syntax for expanding variables. The !name!
syntax requires the command setlocal ENABLEDELAYEDEXPANSION< 来启用首先 /code>, or
CMD /V:ON
Run command prompt.
Don't use PATH as your name, it is the system name that contains the location of all executable programs. If you override it, random parts of the script will stop working. If you plan to change it, you need to do set PATH=%PATH%;C:\Users\DEB\Downloads\10.1.1.0.4
to keep the current PATH contents and add something to the end .