Navigate to folder in VS .NET Command Prompt
I'm trying to follow the TicTacToe program under the help Smart Device Samples. Here are 3 steps they call for:
' TODO: 1) Open a Visual Studio .NET Command Prompt;
' TODO: 2) Navigate to the folder containing this solution
' TODO: 3) Run "setupGameControl.bat"
I think I figured out step 1, i.e. open the Command Window and type >cmd to produce the ">" command prompt (vs the immediate mode)
But, I have no clue how I "navigate" to a folder from there.
I've tried a number of things and only gotten my hand slapped each time.
So, how do you "navigate" to a folder and run a batch file?
Thanks, DaveBo
Re: Navigate to folder in VS .NET Command Prompt
you need to specify CD to change the directory along with the path you wish to go to , eg:
from the Command Prompt ...
CD C:\the_folder_path\bin
that would take you to the folder ... C:\the_folder_path\bin
then you just need to enter the name of the bat file and hit return.
Re: Navigate to folder in VS .NET Command Prompt
Quote:
Originally Posted by dynamic_sysop
CD C:\the_folder_path\bin
I tried that and got
>cd c:\temp
Command "cd" is not valid.
Re: Navigate to folder in VS .NET Command Prompt
i've compiled this little bit of information for you straight from the Visual Studio Command Prompt , if you type CD /? and hit Enter it gives you a list of what CD does ( the options etc... )
Quote:
'/// straight from the VS Command Prompt ...
cd /? '/// typed that and hit enter to show a list of cd commands for you.
'/// what it does ...Displays the name of or changes the current directory.
CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path] '/// <<<< if you are launching the command prompt from a different drive use the /D switch ( eg: CD /D C:\test )
CD [..]
.. Specifies that you want to change to the parent directory.
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Use the /D switch to change current drive in addition to changing current
directory for a drive.
If Command Extensions are enabled CHDIR changes as follows:
The current directory string is converted to use the same case as
the on disk names. So CD C:\TEMP would actually set the current
directory to C:\Temp if that is the case on disk.
CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes. For example:
cd \winnt\profiles\username\programs\start menu
is the same as:
cd "\winnt\profiles\username\programs\start menu"
which is what you would have to type if extensions were disabled.
Re: Navigate to folder in VS .NET Command Prompt
DaveBo, when they say "Open a Visual Studio .NET Command Prompt", then don't mean to use the "Command Window" in the Visual Studio IDE, they mean Start, All Programs, Microsoft Visual Studio .NET 2003, Visual Studio .NET Tools, Visual Studio .NET 2003 Command Prompt.
This brings you to a DOS windows after running vsvars32.bat, which sets a bunch of environment variable to make it easy to compile etc. via the command prompt.
So, not Command Window, Command Prompt.
Re: Navigate to folder in VS .NET Command Prompt
Mike, Thanks.
That was my problem! Wrong place, wrong time, wrong man ...
Thanks again, DaveBo
Re: Navigate to folder in VS .NET Command Prompt
phew. From reading the title of this thread I was ready to ask how you could possibly not know how to use a command prompt. Had me worried that the world has forgotten how to use a command prompt. :p
Glad to see that wasn't the case.
:D
Re: Navigate to folder in VS .NET Command Prompt
Hey, where would all the smart people be if it wasn't for dummies like me?
...
You're welcome.
Have fun, DaveBo (can you give a post a negative rating?)
Re: Navigate to folder in VS .NET Command Prompt
Funny, I was acutally thinking of giving a positive rating. Reason is, in your original post you gave all the details, precisely, to be able to figure out the problem. Not like you said "command something or other" - you were very explicit in what the directions told you to do and what you did. That makes for a good question.