Run an EXE from a different directory?

Cmd

Cmd Problem Overview


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

For a structure like this...

dirZero
|---dirOne
|---|---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. Thanks in advance.

Cmd Solutions


Solution 1 - Cmd

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"

Solution 2 - Cmd

Use a backslash instead

C:\dirZero> dirOne\myProgram.exe

Solution 3 - Cmd

probably u should just simple use

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBenView Question on Stackoverflow
Solution 1 - CmdRuelView Answer on Stackoverflow
Solution 2 - CmdPreet SanghaView Answer on Stackoverflow
Solution 3 - CmdpumamammalView Answer on Stackoverflow