[英]Simple Bat file, Windows cannot find 'nameofthefile'
So i'm trying to create a very simple bat file to run 2 programs. 所以我正在尝试创建一个非常简单的bat文件来运行2个程序。 More specifically hearthstone and the deck tracker. 更具体地说是炉石和甲板追踪器。
this is my bat: 这是我的蝙蝠:
@echo off
cd "D:\Games\Hearthstone.Deck.Tracker-v0.12.3\Hearthstone Deck Tracker"
start HearthstoneDeckTracker.exe
cd "D:\Program Files (x86)\Hearthstone"
start Hearthstone Beta Launcher.exe
exit
While Hearthstone launches with no problem, for some reason it can't find the deck tracker exe. 虽然炉石战记启动时没有问题,但由于某种原因,它找不到套牌追踪器exe。 I copy pasted the path directly, it IS correct and the file exists. 我直接复制粘贴路径,它是正确的并且文件存在。
Also note that i wrotte a simple code in python 3.5 and both programs open with no problem. 还要注意,我在python 3.5中编写了一个简单的代码,并且两个程序都打开没有问题。
So... what's going on? 发生什么了?
Try this: 尝试这个:
cd /d "D:\Games\Hearthstone.Deck.Tracker-v0.12.3\Hearthstone Deck Tracker"
start HearthstoneDeckTracker.exe
cd /d "D:\Program Files (x86)\Hearthstone"
start "Hearthstone Beta Launcher" "Hearthstone Beta Launcher.exe"
The /d
option allows cd
to change drives as well as directories. /d
选项允许cd
更改驱动器以及目录。 The quote marks (and extra argument) are necessary to allow start
to run a program with spaces in the name. 引号(和额外的参数)对于允许start
运行名称中带有空格的程序是必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.