When was mkdir /D added?

#1
Maaaaaaaaaaany years ago, I added a nice little batch to my toolset, "mc.bat" (mc.btm later on), that would make a directory and then change into it. I have discovered today that mkdir /D does just that. Gawd, I feel dumb.

But now I wonder, how many years have I been in this situation? Is the /D option a recent adition, or is it actually pretty old?
 

samintz

Scott Mintz
May 20, 2008
1,295
11
Solon, OH, USA
#4
There was an example ALIAS named ND that was introduced way back in the 4DOS days that did the same thing.
I use these ALIAS's all the time:
Code:
nd=md %1 & cdd %1
in=pu %1 & %2$ & po
pu=pushd
po=popd
al=alias
 
#5
There was an example ALIAS named ND that was introduced way back in the 4DOS days that did the same thing.
I use these ALIAS's all the time:
Code:
nd=md %1 & cdd %1
in=pu %1 & %2$ & po
pu=pushd
po=popd
al=alias
I remember the first one of those. It's from way, way back. I never found a use for directory stacks with more than one entry so ever since those days I've had an alias to go b(ack).
Code:
alias b cdd -
and one to go u(p).
Code:
alias u cd ..
 
#7
Mine looks like this:
Code:
md /s %1 && %1\
... and yes, I continue to favor it over MD /D.
At first, mine was a simple
Code:
md & cd
. At some point during all these years, I decided to be able to make a directory and change into it even if I had neglected to give it a name, so I ended up with this:

Code:
@echo off
iff "%1"=="" then
  set U=%@unique[.]
  set N=%@filename[%U]
  del "%U" >nul
  mkdir "%N"
  if "%_?"=="0" cd %N
  unset U
  unset N
else
  mkdir %1
  if "%_?"=="0" cd %1
endiff
My memories about making this change are rather nebulous, so this stunt must have have been pulled between 2007 and 2010.
 
#11
Code:
alias b cdd -
and one to go u(p).
Code:
alias u cd ..
I've found it more intuitive to just use
Code:
alias -=*cd -
alias ..=*cd ..
alias ...=*cd ..\..
alias ....=*cd ..\..\..
alias \=*cd \
alias /=*cd \
alias .=echo %_CWD
alias ~=*cdd %TCCDIR%
rather than trying to remember mnemonics. For me, unless it's an OS function (like t for type), there are too many one letter apps I have already to dedicate a valuable letter to directory moves :-)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,667
46
Albuquerque, NM
prospero.unm.edu
#12
I've found it more intuitive to just use
Code:
alias -=*cd -
alias ..=*cd ..
alias ...=*cd ..\..
alias ....=*cd ..\..\..
alias \=*cd \
alias /=*cd \
alias .=echo %_CWD
alias ~=*cdd %TCCDIR%
rather than trying to remember mnemonics. For me, unless it's an OS function (like t for type), there are too many one letter apps I have already to dedicate a valuable letter to directory moves :-)
The first six will work even if you don't define an alias :cool: