尝试打印出文件的 8dot3 名称,当我将该行粘贴到命令提示符中时它确实有效,但当我从批处理文件运行它时无效。
粘贴时的结果:
D:\tmp>cmd /e:on /c for %A in (8088_othello.com) do @echo %~nxsA
8088_O~1.COM
批处理文件的结果:
D:\tmp>lfn.bat
D:\tmp>cmd /e:on /c for ~nxsA
~nxsA was unexpected at this time.
还需要什么才能使其在批处理文件中工作?