【发布时间】:2014-01-13 06:22:19
【问题描述】:
我想问一个问题。
我想在 directory-of-file\program 中“调用”一个文件。
调用 *\program\test.bat
我该怎么做?
感谢您的帮助。
【问题讨论】:
我想问一个问题。
我想在 directory-of-file\program 中“调用”一个文件。
调用 *\program\test.bat
我该怎么做?
感谢您的帮助。
【问题讨论】:
%~dp0 为您提供运行的批处理文件所在的目录。
所以应该这样做:
call %~dp0\subdir\test.bat
【讨论】:
当program 文件夹位于current batch file 所在的位置时,这将调用program\test.bat 文件。
call "program\test.bat"
【讨论】: