basic use of DOS prompt

G

Guest

I have to run a .exe file from the command prompt but don't know how to
navigate to the file because there are spaces in the directory names.

This is the line I'm supposed to type according to the documentation:

C:\> C:\mysql\bin\mysqld --console

But the actual location would be:

C:\> C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld --console

Typing this brings up the error: 'C:\Program' is not recognized as an
internal or external command...

The spaces in the directories are screwing up the command-line interface!

How would one run an executable at the path mentioned above?
 
J

Jerry

inte said:
I have to run a .exe file from the command prompt but don't know how to
navigate to the file because there are spaces in the directory names.

This is the line I'm supposed to type according to the documentation:

C:\> C:\mysql\bin\mysqld --console

But the actual location would be:

C:\> C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld --console

Typing this brings up the error: 'C:\Program' is not recognized as an
internal or external command...

The spaces in the directories are screwing up the command-line interface!

How would one run an executable at the path mentioned above?


C:\> "C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld" --console
 
S

Shenan Stanley

inte said:
I have to run a .exe file from the command prompt but don't know how
to navigate to the file because there are spaces in the directory
names.

This is the line I'm supposed to type according to the documentation:

C:\> C:\mysql\bin\mysqld --console

But the actual location would be:

C:\> C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld --console

Typing this brings up the error: 'C:\Program' is not recognized as an
internal or external command...

The spaces in the directories are screwing up the command-line
interface!

How would one run an executable at the path mentioned above?

use quotation marks around the entire path..

"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld" --console
 
T

Test User

inte said:
I have to run a .exe file from the command prompt but don't know how to
navigate to the file because there are spaces in the directory names.

This is the line I'm supposed to type according to the documentation:

C:\> C:\mysql\bin\mysqld --console

But the actual location would be:

C:\> C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld --console

Typing this brings up the error: 'C:\Program' is not recognized as an
internal or external command...

The spaces in the directories are screwing up the command-line interface!

How would one run an executable at the path mentioned above?

Couple of things. If you're using command.com to get the dos box, use
quotes to enclose the path. Second, you may find that if you use cmd.exe
instead, you don't need the quotes.

HTH
-pk
 
J

Jim Macklin

The C:\> shows that you are already in the C: directory
(folder) so you don't type that in again.
At the C:\> prompt just type mysqld --console
It is likely that there is a PATH statement that will cause
the system to look in Program Files by default.
It is also possible that the command you want is
mysqld_console (underscore rather than hyphen -)

You can also use the DIR and CD commands and navigate to the
folder with your desired program and then just enter the
name for instance cmd.exe will run when you just enter cmd


--
The people think the Constitution protects their rights;
But government sees it as an obstacle to be overcome.


| inte wrote:
| > I have to run a .exe file from the command prompt but
don't know how
| > to navigate to the file because there are spaces in the
directory
| > names.
| >
| > This is the line I'm supposed to type according to the
documentation:
| >
| > C:\> C:\mysql\bin\mysqld --console
| >
| > But the actual location would be:
| >
| > C:\> C:\Program Files\MySQL\MySQL Server
4.1\bin\mysqld --console
| >
| > Typing this brings up the error: 'C:\Program' is not
recognized as an
| > internal or external command...
| >
| > The spaces in the directories are screwing up the
command-line
| > interface!
| >
| > How would one run an executable at the path mentioned
above?
|
| use quotation marks around the entire path..
|
| "C:\Program Files\MySQL\MySQL Server
4.1\bin\mysqld" --console
|
| --
| <- Shenan ->
| --
| The information is provided "as is", it is suggested you
research for
| yourself before you take any advice - you are the one
ultimately
| responsible for your actions/problems/solutions. Know
what you are
| getting into before you jump in with both feet.
|
|
 
J

~Jeff~

You can also start command prompt, type CD {one space} and then drag the
fold from explore/my computer onto the command prompt window. This will
insert the proper text and in quotes if required.

HTH
 
S

Shenan Stanley

Jim said:
The C:\> shows that you are already in the C: directory
(folder) so you don't type that in again.
At the C:\> prompt just type mysqld --console
It is likely that there is a PATH statement that will cause
the system to look in Program Files by default.
It is also possible that the command you want is
mysqld_console (underscore rather than hyphen -)

You can also use the DIR and CD commands and navigate to the
folder with your desired program and then just enter the
name for instance cmd.exe will run when you just enter cmd


Admittedly..
That could be in their path and their indication was that they were in the
root of C..

But I was thinking in batch terminology.. You could even have put:

"%SystemDrive%\Program Files\MySQL\MySQL Server 4.1\bin\mysqld" --console
or
"%ProgramFiles%\MySQL\MySQL Server 4.1\bin\mysqld" --console

(for a batch script.)

Or you could add the SQL directory to your path...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top