Change the current disk and  directory
d.cmd
 
Most people know that at any given time there is a current disk and directory associated with a command window. Any file operations that you specify, if the disk and directory are not specified, affect files in the current directory.
 
As most people know the cd command changes the current directory. As these people (usually painfully) find out, sometimes the cd command seems to have no effect. In other words, if the current directory is C:\Users\David and the command cd D:\Data is entered it does not appear as if the command worked; the current disk and directory remains C:\Users\David.
 
Here is what is really happening: Windows maintains a separate current directory associated with each disk. The cd D:\Data command changed the current directory associated with the disk D: but not with the current disk C:
 
d.cmd does not behave like that. It changes both the current disk, if specified, and the directory. Like pd.cmd and pop.cmd it also modifies the widnow's title to be the current disk and directory.
 
Typing d without a directory name will change the window title to be the current disk and directory.
 
 
The command procedure includes "help text" which you can display as follows:
 
C:\Users\David> d -h
 
d is a front end for the cd command that replaces ⁄ with \ in directory names
Usage: d [-mk] [-s] [-] [-h] [directory]
       -mk dir keyword will generate cd%keyword%.cmd to cd to dir
       -f will display the cd*.cmd files created by "d -mk"
       -sym SYMBOL will set SYMBOL to a directory
        e.g.
            cd "c:\Documents and Settings"
            d -sym ABC
            sets ABC="C:\Deleted\C\Documents and Settings"
            (default is the current directory)
       - is ignored, allowing -mk, etc. to be specified as directory names
       -h, -help, or --help will display this information
 
d also changes the window title to be the current directory
Without any arguments, d will display the current directory
Unlike the cd command, d will also change the current drive
 
Notes: Type cd ⁄? for help with the cd command
d.cmd: $Revision: 1.1 $ $Date: 2011⁄03⁄06 00:30:25 $
 
 
The -mk option needs a little clarification. It works almost identically to the -mk option associated with the push a directory command procedure. Hopefully the clarification can be found there. The only difference is that pd -mk keyword generates pdkeyword.cmd and d -mk keyword generated cdkeyword.cmd.
Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 32 of 485)
 
Comments, flames, broken links?
Please send email to maintainer@intricate-simplicity.com