Windows Commands: Change Directory - Select a Folder (and drive)


CD-Windows Command

CD

Change Directory - Select a Folder (and drive)

Syntax
      CD [/D] [drive:][path]
      CD [..]

Key
   /D : change the current DRIVE in addition to changing folder.   

Examples

   To change to the parent directory.
   CD .. 
   
   To change to the grant-parent directory.
   CD ..\..
   
   To change to the ROOT directory.
   CD \ 
   
   To display the current directory in the specified drive. 
   Type CD <drive>: 
   
   To display the current drive and directory.
   CD
   
   Moving down the folder tree with a full path reference to the ROOT folder...
   C:\winnt> CD \winnt\java
   C:\winnt\java> 
   
   Moving down the folder tree with a reference RELATIVE to the current folder...
   C:\winnt> CD java
   C:\winnt\java> 
   
   Moving up and down the folder tree in one command...
   C:\winnt\java> CD ..\system32
   C:\winnt\system32>


If Command Extensions are enabled the CD command is enhanced as follows:

1)
The current directory string is converted to use the correct CASE.
So CD C:\wiNnt would actually set the current directory to C:\Winnt

2)
CD does not treat spaces as delimiters, so it is possible to CD into a subfolder name that contains a space without surrounding the name with quotes.

For example:
cd \My folder

is the same as:
cd "\My folder"

3)
An asterisk can be used to complete a folder name
e.g. from C:\

CD pro*
will move to
C:\Program Files


CHDIR is a synonym for CD

Tab Completion

This allows changing current folder by entering part of the path and pressing TAB

   C:> CD Prog [PRESS TAB] 
   Will go to C:\Program Files\

Tab Completion is disabled by default, it has been known to create difficulty when using a batch script to process text files that contain TAB characters.

Tab Completion is turned on by setting the registry value shown below

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009

Changing the Current drive

simply enter the drive letter followed by a colon
C:> E:
E:>

To change drive and directory at the same time, use CD with the /D switch
C:> cd /D E:\utils
E:\utils\>

Other Windows 98, Windows XP Commands:
addusers , arp , assoc , associate , at , attrib , browstat , cacls , call , cd , change , chkdsk , chkntfs , choice , cipher , cleanmgr , clip , cmd , color , comp , con2prt , copy , date , defrag , del , delprof , dir , diruse , diskcomp , diskcopy , doskey , dsadd , dsmod , echo , endlocal , exit , expand , expand , fc , fdisk , find , findstr , for , forfiles , format , fsutil , ftp , ftype , global , goto , help , hfnetchk , if , ifmember , ipconfig , kill , label , ldifde , local , logevent , logoff , logtime , mapisend , md , mem , mode , monitor , more , mountvol , move , moveuser , msg , msiexec , msinfo32 , mstsc , munge , mv , nbtstat , net , netdom , netsh , netstat , netsvc , now , nslookup , ntbackup , ntrights , path , pathping , pause , perms , ping , popd , portqry , print , prncnfg , prnmngr , prompt , pushd , qgrep , rasdial , rasphone , rd , rdisk , recover , reg , regedit , regsvr32 , rem , ren , replace , rmtshare , robocopy , route , runas , rundll32 , sc , schtasks , sclist , scriptit , set , setlocal , setx , share , shift , shortcut , showgrps , showmbrs , shutdown , sleep , soon , sort , start , su , subinacl , subst , tasklist , time , timeout , title , touch , tracert , type , ver , verify , vol , where , whoami , windiff , winmsd , winmsdp , wmic , xcacls , xcopy ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources