如何从脚本本身获取Windows .bat脚本的名称?
发布时间:2020-12-13 23:21:45 所属栏目:Windows 来源:网络整理
导读:我有一个.bat文件.我想以编程方式获取.bat文件的名称.我怎样才能做到这一点? 这是我的最终目标 "..libnantnant.exe" -buildfile:nant.build {{pass in name of this file here}}pause 试试/?在命令行上.帮助显示各种有用的文件名替换,例如: %~I - expa
我有一个.bat文件.我想以编程方式获取.bat文件的名称.我怎样才能做到这一点?
这是我的最终目标 "..libnantnant.exe" -buildfile:nant.build {{pass in name of this file here}} pause
试试/?在命令行上.帮助显示各种有用的文件名替换,例如:
%~I - expands %I removing any surrounding quotes (") %~fI - expands %I to a fully qualified path name %~dI - expands %I to a drive letter only %~pI - expands %I to a path only %~nI - expands %I to a file name only %~xI - expands %I to a file extension only 将I替换为0以获取批处理文件名,并将I替换为1,2,3等以获取参数名称. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows – 使用innosetup在开始菜单中创建快捷方式
- Windows 10 安装 VMware workstation 12 版本出错,不兼容。
- 量子计算机到底多强大?从量子运算看清楚它们的能力
- windows-server-2008-r2 – 远程删除卷影副本
- Windows10:Opencv4.0+Opencv4.0.1_contrib编译
- Microsoft MSWebDVD ActiveX 控件远程代码执行漏洞(MS09-0
- .net – 是否可以将dll转换为源代码?
- windows – 如何知道何时正确使用iSCSI,NFS或SMB?
- 使用代码操作windows防火墙的启用与关闭
- azure-active-directory – 如何从graph.microsoft.com获取