Darkbatcher wrote:Seriously ? what is powershell made for ? Maybe I'm wrong but microsoft has designed it as a replacement for cmd.
It is true that cmd.exe, the complete WSH (cscript/wscript with JScript, and VBScript), the complete .NET, and some other tools should be replaced by Powershell (->Monad):
Monad Manifesto - Public.doc wrote:1. A programmatic shell (e.g. sh, csh, ksh, bash)
2. A set of administrative commands (e.g. ifconfig, ps, chmod, kill)
3. A set of text manipulation utilities (e.g. awk, grep, sed).
4. Administrative GUIs layered on top of commands and utilities
But in short Powershell was designed to support system developers, testers, power users, and administrators only.
A subset of the Powershell commands may be free to use (if not disabled by admin)
and should replace these; see:
http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-01-91-05-67/Monad-Manifesto-_2D00_-Public.doc.
Note: Monad is something like the powershell roadmap, so if all is implemented Powershell == Monad (actually not).
Darkbatcher wrote:Is this really bad that "/D" does not work ? In fact, it is ignored.
I haven't tested it, but it sounds, like DOS9-"cd" implementation always does what cmd-"cd /D" does.
That may be a problem for all scripts setting up directories in different volumes:
Code: Select all
:: actual directory is P:\printerList\CIP_Pool_3
cd E:\errors\printerList\CIP_Pool_3
cd W:\warnings\printerList\CIP_Pool_3
:: DOS9 actual directory: W:\warnings\printerList\CIP_Pool_3
:: cmd.exe actual directory: P:\printerList\CIP_Pool_3
for /F "tokens=* delims=" %a in (printer.txt) do (
:: (...)
This is easy to patch, but you have to review all scripts.
Darkbatcher wrote:For the "x:" syntax, it do not use it, and I did not think it was so widely used.
I've seen tons of scripts using that.
Most of them some time ago, but in one of the last topics it was used:
http://www.dostips.com/forum/viewtopic.php?f=3&t=5531.
Darkbatcher wrote:"CD X:", I did not even know about that. That's what's wonderfull with cmd, every new post teach me a brand new syntax

Actually i haven't tested it, but this leads me to the question:
Are the dynamic environment variables implemented (at least the documented ones are used intensively)?
Documented ones:
"CD", "DATE", "TIME", "RANDOM", "ERRORLEVEL", "CMDEXTVERSION", "CMDCMDLINE".
Undocumented ones:
- if volumes exist and are accessed/ cd used on that drive: "=C:", "=C:"
- If an exitcode was set: "=ExitCode"
penpen