Using Command Lines in Windows

A

Alice Wei

Hi,

I have been using the OS system a lot more in command line environments,
and now I have to use Windows to do this. I wonder if anyone could tell me
how I can change the directory when I am in the command line environment.

My home directory prompts a different drive number when I open up the
shell, and it is not a C. The files I need to run are all in C drive. Is
there some way I can do something like cd in Windows?

Thanks in advance.
 
J

John H

Not sure what you are doing to shell to your command prompt, but in
Programs >Accessories
there is a command prompt line that works basically the same as good old
dos.
Assuming you are using that, then same as for dos namely:
If say your home directory is d:\fred,
then to go to C drive type c:\ and hit enter key
then to change to any other folder in C drive, typing cd\fred and hit enter
keywill take you to c:\fred,
to go further out is slightly different to go from c:\fred to c:\fred\nerk,
then in c:\fred, type cd nerk and hit enter key this should take you to
c:\fred\nerk

Now if you want to go back to c:\fred from there, type cd.. and hit enter
key and you will go back one level to c:\fred

If you were in c:\ and wanted to go straight to c:\fred\nerk then you would
type cd\fred/nerk and hit enter key and

if you were in c:\fred\nerk and wanted to go to c:\ then you would type cd\

*** If the folder name exceeds 8 characters you may have to use the tilde ~1
convention,
such as c:\abcdefghijklm would be typed as c:\abcdef~1 (where the total
characters equal total of 8 including the tilde & the 1)

Have fun
John H
 
A

Alice Wei

Hi,

Yes, that is what I wanted to do. However, my question is that I needed to
be able to run stuff that is not in C in my hard drive. My command line
prompt set up give me

U:>

whenever I open up the prompt. Is it possible to change it to something like
C: using cd?

Thanks for your help.
 
P

Pegasus \(MVP\)

Alice Wei said:
Hi,

I have been using the OS system a lot more in command line environments,
and now I have to use Windows to do this. I wonder if anyone could tell me
how I can change the directory when I am in the command line environment.

My home directory prompts a different drive number when I open up the
shell, and it is not a C. The files I need to run are all in C drive. Is
there some way I can do something like cd in Windows?

Thanks in advance.

Create a desktop shortcut with these properties:
- Target: cmd.exe
- Starting folder: c:\

If you want something a little more useful, type this in the Target box:
cmd /k mode con lines=50
 
A

Alice Wei

Hi,

I think what you provided here is to get me to the directory I want
directory from the GUI on the screen, but what I need is a method using
commands to take me to the C drive so I can execute the scripts directly.

I tried cd C:\, but it does not seem to work.

Is there any way I can do this on Windows?
Thanks in advance.
 
J

John McGaw

Alice said:
Hi,

Yes, that is what I wanted to do. However, my question is that I needed to
be able to run stuff that is not in C in my hard drive. My command line
prompt set up give me

U:>

whenever I open up the prompt. Is it possible to change it to something like
C: using cd?

Thanks for your help.

:
snip...
snip...

As was written in the previous reply. If you want to go to the C: drive you
simply type "C: [enter]" without the quotes and where [enter] means press
the enter key. To change to a different directory you use "cd". It is
really almost indistinguishable from what has been going on at the command
line since DOS days.

John McGaw
http://johnmcgaw.com
 
O

Olórin

Alice Wei said:
Hi,

I have been using the OS system a lot more in command line environments,
and now I have to use Windows to do this. I wonder if anyone could tell me
how I can change the directory when I am in the command line environment.

My home directory prompts a different drive number when I open up the
shell, and it is not a C. The files I need to run are all in C drive. Is
there some way I can do something like cd in Windows?

Thanks in advance.

Just type the drive's letter (not number) followed by a colon, thusly:

c:

and press Enter.

cd will move you around within the current drive.
 
J

John McGaw

Alice said:
Hi,

I think what you provided here is to get me to the directory I want
directory from the GUI on the screen, but what I need is a method using
commands to take me to the C drive so I can execute the scripts directly.

I tried cd C:\, but it does not seem to work.

Is there any way I can do this on Windows?
Thanks in advance.

You seem to be fixated on "cd". Forget "cd" for a moment. Open the cmd
window then type C: and then press enter. You will find yourself in the C:
drive. _Then_ you may use "cd" to go to some other directory on the C:
drive if you need to.

John McGaw
http://johnmcgaw.com
 
H

HeyBub

John said:
You seem to be fixated on "cd". Forget "cd" for a moment. Open the cmd
window then type C: and then press enter. You will find yourself in
the C: drive. _Then_ you may use "cd" to go to some other directory
on the C: drive if you need to.

Psst! I think she's trying to say she doesn't HAVE a "C" drive.
 

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

Top