Microsoft brain-damage of the day

Ben Scott dragonhawk at gmail.com
Thu Nov 30 09:15:52 EST 2006


On 11/30/06, Ted Roche <tedroche at tedroche.com> wrote:
> Yeah, that's classic DOS/CMD. If you want YYYY-MM-DD, it's as simple as
>
> FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%k-%%i-%%j

  Nitpick: DOS, which just had COMMAND.COM, couldn't do that at all.
You need WinNT's shell (CMD.EXE) for that to work.  And then WinNT
shell isn't "DOS" any more than an xterm is.  (It does suck a lot more
than an xterm, though.)

  Back in the days when I actually ran DOS, I used the third-party
4DOS shell, but I don't think even 4DOS supported command
substitution.

-- Ben


More information about the gnhlug-discuss mailing list