SetLocal EnableDelayedExpansion FOR %%i IN ("E:\桌面\lib\*.jar") DO SET CLASSPATH=!CLASSPATH!;%%i echo %CLASSPATH% EndLocal pause