【发布时间】:2013-08-14 02:41:36
【问题描述】:
试图打印出文件的 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.
还需要什么才能使其在批处理文件中工作?
【问题讨论】:
-
我的问题是编码。当我将 bat 文件设为 utf-8 时,一切正常。以前它在 ucs-2 上
标签: windows command-line batch-file