Windows Shell命令获取当前目录的完整路径? [英] Windows shell command to get the full path to the current directory?
本文介绍了Windows Shell命令获取当前目录的完整路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有Windows命令行命令可用于获取当前工作目录的完整路径?
Is there a Windows command line command that I can use to get the full path to the current working directory?
此外,我如何将该路径存储在批处理文件中使用的变量中?
Also, how can I store this path inside a variable used in a batch file?
推荐答案
如果直接使用shell,则不带任何参数使用cd
;如果要在批处理文件中使用%cd%
,则不带任何参数(它的行为就像一个环境变量).
Use cd
with no arguments if you're using the shell directly, or %cd%
if you want to use it in a batch file (it behaves like an environment variable).
这篇关于Windows Shell命令获取当前目录的完整路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文