找出正在运行的批处理文件的文件名 [英] Finding out the file name of the running batch file

查看:108
本文介绍了找出正在运行的批处理文件的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows批处理文件我想figgure什么这个批处理文件的完全合格的路径名。

我试过%0但这只是给我输入的命令(例如只是不带路径或扩展名的文件名)。


解决方案

 回声%〜F0

我的作品。

Inside a windows batch file I'd like to figgure out what the fully qualified path name of this batch file is.

I tried %0 but this does only give me the typed command (e.g. just the file name without path or extension).

解决方案

echo %~f0

works for me.

这篇关于找出正在运行的批处理文件的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆