Just when I was starting to actually enjoy (read: thinking “hey, it’s not so bad!”) Windows scripting after discovering documentation for the 32 bits command interpreter in Windows NT, I realize I have been spoiled by Unix shells and expect some things to work, and then frown in disgust when they don’t.
for /F "usebackq tokens=2,*" %i in (`net use | find "..."`)...
| was unexpected
I really wanted to like writing cmd scripts. But the parser is way too obnoxious when parsing brackets. For instance, you can’t set an environement variable in one branch of a conditional statement.
if "text" EQU "othertext" (
set VAR=value
) else (
echo Not Working.
)
This will fail silently or with unexpected results. Can’t wait until PowerShell becomes mainstream enough for me to use.
