我有一个带有 Dropbox 和 emacs 便携式安装的 USB 闪存驱动器。我想在emacs中运行的功能之一需要sha1sum.exe在路径中,所以我也把coreutils放在了USB上。我正在编写一个批处理文件,其中:
这是我所拥有的:
set PATH="%PATH%;%~d0\pathtocoreutils\bin;%~d0\pathtodropbox;%~d0\pathtoemacs\bin"
echo %PATH%
timeout 10
start DropboxPortableAHK.exe
timeout 10
runemacs.exe
Run Code Online (Sandbox Code Playgroud)
当我在新的命令窗口中运行它时,set和echo命令给出了预期的结果,但其他一切都会给出错误,表明文件不在路径上(包括timeout为调试而添加的,不在任何新的 PATH 条目中):
'timeout' is not recognized as in internal or external command,
executable program or batch file.
The system cannot find the file DropboxPortableAHK.exe.
'timeout' is not recognized as in internal or external command,
executable program or batch file. …Run Code Online (Sandbox Code Playgroud)