bat gets the first paragraph of the property value of the environment variable

A semicolon separates the paths in Path, take the first path with tokens=1, the second token=2, and so on
for /f "tokens=2 delims=;" %%a in ("%path %") do set NewPATH=%%a

@echo off
FOR /F "tokens=1,2* delims=;" %%a in ("%path%") do set newPATH=%%b
echo newPATH=%newPATH %

Practical application:
echo off
FOR /F "tokens=1,2* delims=;" %%a in ("%ALMS_PATH%") do set newPATH=%%a

echo %newPATH%


output:
[email protected]. xxx.xx


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326625582&siteId=291194637