开发者

How to get the current directory the file executed is in using batch of windows?

开发者 https://www.devze.com 2022-12-23 14:00 出处:网络
I\'m not familiar with this programming language,in PHP 开发者_如何学Cit\'s getcwd().Not entirely sure I understand your question but:

I'm not familiar with this programming language,in PHP 开发者_如何学Cit's getcwd().


Not entirely sure I understand your question but:

The current directory is held in the pseudo-variable %CD%

Getting the directory that the Batch file is located in can be done as follows:

%~dp0 

%0 is the name of the batch file. ~dp gives you the drive and path of the specified argument.

0

精彩评论

暂无评论...
验证码 换一张
取 消