basic use of DOS prompt

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

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?
 

Jerry

Distinguished
Dec 31, 2007
1,812
0
19,780
0
Archived from groups: microsoft.public.windowsxp.basics (More info?)

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?


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

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

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.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

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.


"Shenan Stanley" <news_helper@hushmail.com> wrote in message
news:ezWoQuV3EHA.1188@tk2msftngp13.phx.gbl...
| 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.
|
|
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

Jim Macklin wrote:
> 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...

--
<- 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.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

"inte" <inte@discussions.microsoft.com> wrote in message
news:5C6720AE-35E2-480C-80F7-0632D1D6B178@microsoft.com...
> 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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.basics (More info?)

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

--
~Jeff~
[Microsoft Windows XP Pro,Office 2000]
"inte" <inte@discussions.microsoft.com> wrote in message
news:5C6720AE-35E2-480C-80F7-0632D1D6B178@microsoft.com...
> 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?
 

ASK THE COMMUNITY