1.

Solve : How do I switch from my drives via cmd??

Answer»

How do I switch from F: drive to G: via cmd? I tried almost everything. Here is a copy of cmd.



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\Documents and Settings\baseball01>cd G:\

F:\Documents and Settings\baseball01>cd G:\

F:\Documents and Settings\baseball01>cd G:\>
The syntax of the command is incorrect.

F:\Documents and Settings\baseball01>cd C:\

F:\Documents and Settings\baseball01>C:\
'C:\' is not recognized as an internal or external command,
operable program or batch file.

F:\Documents and Settings\baseball01>cd C:\

F:\Documents and Settings\baseball01>cd C:/

F:\Documents and Settings\baseball01>try the /d param.

Code: [SELECT]cd /d c:\blah\blah\or
Code: [Select]cd /d j:\blah\blah
etc I want to get to my G drive. It won't let me. Here is the code.




Code: [Select]Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\Documents and Settings\baseball01>cd /g
The system cannot find the path specified.

F:\Documents and Settings\baseball01>


Quote from: BatchFileBasics on August 05, 2009, 02:06:55 PM

try the /d param.

Code: [Select]cd /d c:\blah\blah\or
Code: [Select]cd /d j:\blah\blah
etc
i'm sorry, i didn't make it clear.

the /d param, is /D(rive)

so to GO to c:\.
Code: [Select]cd /D c:\
to go to g:\
Code: [Select]cd /D g:\

hope IM clear now

and you can get a FULL help by going to command prompt and typing
cd /?Thank you so much.Or you just type the drive letter and a colon

Code: [Select]C:Quote from: Salmon Trout on August 05, 2009, 03:45:04 PM
Or you just type the drive letter and a colon

Code: [Select]C:

heh, yeah I was reading this thread going "*censored* is this cd /D nonsense..."Quote from: BC_Programmer on August 05, 2009, 10:34:53 PM
heh, yeah I was reading this thread going "*censored* is this cd /D nonsense..."



Why can't I cd into Program Files? It's on my F: drive.



Code: [Select]Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\Documents and Settings\baseball01>cd program files
The system cannot find the path specified.

F:\Documents and Settings\baseball01>Quote from: php111 on August 07, 2009, 05:04:33 AM


Why can't I cd into Program Files? It's on my F: drive.



Code: [Select]Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

F:\Documents and Settings\baseball01>cd program files
The system cannot find the path specified.

F:\Documents and Settings\baseball01>

If you type CD and a folder name with no preceding path it is assumed to be below the folder you are currently in. You are in the folder F:\Documents and Settings\baseball01 so when you type cd program files what happens is that the system tries to CD into F:\Documents and Settings\baseball01\program files. Does such a folder exist? Even if it does, it's gonna fail - you need quotes in a path / folder / filename that contains any spaces.

Maybe you need CD "F:\Program Files" ... ?

or just the root specifier (\)

heck I use cd .. and relative paths quite a lot for copying files around and whatnot.



A recent discovery I made was that we can now use wildcards to change directories, such as cd p*, which works for me to change to the program files folder.


Discussion

No Comment Found