与批处理文件关联的扩展,获取批处理文件的文件名

时间:2016-12-02 11:25:47

标签: batch-file cmd

我有一个文件

1.pt1, 2.pt1, 3.pt1 ....

(the *.pt1 is associated with with test.bat in windows)
bat文件中的

就是这个commnad:

 ..\IMPORT.EXE "FILENAME" /format:6

我需要把真正的文件名1.ptj1,2.ptj1 ...

放在那里

谢谢Rasto

我尝试使用%~nx0而不是pt1文件我在那里找到test.bat文件名....

1 个答案:

答案 0 :(得分:0)

<强>解决方案:

echo "%~nx1"
..\IMPORT.EXE "%~nx1" /format:6
相关问题