CD or CHDIR
Points to Remember :
- The CD or CHDIR command switches (or changes) to the specified directory.
- The command with double dot (i.e.CD..) changes to the parent directory.
- The command with back slash (i.e. CD\) switches to the root directory.
Syntax
CD [drive:] [path]
CHDIR [drive:] [path]
CD [..]
CD [\]
where,
CHDIR : Change directory
CD : Abbreviated version of CHDIR.
[drive:] : The drive where the directory change is to be performed
[path] : The location of directory to be changed into.
.. : To change to parent directory.
\ : To change to the root directory.
Example 1
C:\>CD CLASS9 (press enter key)
It changes (or switches) into the sub directory CLASS9 of root directory (C:/>).
Example 2
C:\>CHDIR CLASS`10(press enter key)
It also changes into sub directory CLASS10 of root directory and C:\> prompt
changes to C:\CLASS10>
Example 3
C:\>CD CLASS9\SUMA (press enter key)
It also changes(enters) into sub directory SUMA of directory CLASS9 from C:\>
in a single step, and shows the prompt as: C:\CLASS9\SUMA>
Example 4
C:\CLASS9\SUMA\..(press enter key)
It changes to the parent directory CLASS9 of sub directory SUMA and shows the
prompt as: C:\CLASS9>
Example 5
C:\CLASS9>SUMA>CD\ (press enter key)
It changes to the next sub directory and shows the prompt as B:C:\CLASS10
Example 6
C:\>CLASS9>CD>\CLASS10(press enter key)
It changes to the next sub directory (i.e. CLASS10) of root directory and shows
the prompt as C:\CLASS10>
Example 7
C:\CLASS10>CD(press enter key)
It shows currently working directory C:\CLASS10
No comments:
Post a Comment