please dont rip this site
previous | start | next


CD

Displays the name of or changes the current directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
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 delimeters, 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.

Russell notes that wildcards may be used in the path and CD will select the first matching directory. This is very useful with long directory names. This can also be used to develop small batch files that do useful things without requiring the full directory path. e.g.

    @echo off
    cd *%1*%2*%3*
    dir /on/p
    cd..

which will show the contents of a subdirectory without being given the entire subdirectory name. The multiple parameters (*%1*%2 etc...) allow one to enter multiple parts of the directory name. E.g. directory abcdef may be found with "ab ef" or "ab d f"

Back to the top of this page

 



previous | start | next

To save and restore the current directory, use pushd (folder) and popd +


file: /Techref/os/win/winnt/slide8.htm, 2KB, , updated: 2011/4/11 10:24, local time: 2024/11/24 22:12,
TOP NEW HELP FIND: 
3.15.145.50:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/techref/os/win/winnt/slide8.htm"> Help for all NT Version 4.0 commands</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .