开发者

Run an EXE from a different directory?

开发者 https://www.devze.com 2023-01-19 06:00 出处:网络
After a bit of googling and searching here, couldn\'t find the answer to this silly question! For a structure like this...

After a bit of googling and searching here, couldn't find the answer to this silly question!

For a structure like this...

dirZero
|---dirOne
|--开发者_Python百科-|---myProgram.exe

How do I run "myProgram" if my current directory is dirZero? I.E.,

C:\dirZero> dirOne/myProgram.exe

...which obviously doesn't work.


You should use a backslash \, instead of forward slash. /

C:\dirZero> dirOne\myProgram.exe

Or, wrap it with double quotes "

C:\dirZero> "dirOne/myProgram.exe"


Use a backslash instead

C:\dirZero> dirOne\myProgram.exe


probably u should just simple use

cd C:\dirZero\dirOne
C:\dirZero\dirOne> myProgram.exe
0

精彩评论

暂无评论...
验证码 换一张
取 消