Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

COMMAND.COM IS 40 YEARS OLD

Oct
364
17
Checked just out of curiosity.

command.com first came out in 1980, so it's 40 years old.

If Microsoft had continued ACTIVE development for FORTY YEARS--TCMD is what it would look like today.
 
It probably would not look like tcmd. Firstly, there was an update in windows 2000. But since then, microsoft has been trying to push people onto powershell, or vbasicscript or whatever. There has been plenty of room to interface with the windows shell, but this has largely not happened.

For example, to emulate changing to a shell directory, I use frank westlake's conset. Not only do you have the choice of the standard shell folders, you can make up your own. so "cdf email" opens up the email download directory, and "cdf source" opens up the page to the source of my webpage.
 
You can do something similar in PowerShell. In my PS startup script I have something like this:

Code:
New-PSDrive -Name 'desk' -PSProvider FileSystem -Root "$env:USERPROFILE\Desktop"
New-PSDrive -Name 'docs' -PSProvider FileSystem -Root "$env:USERPROFILE\Documents"

This lets me do a "cd desk:" to go to my Desktop directory.
 
This is my way of changing to a folder in PowerShell, which is similar in TCC;
Code:
function utils: { set-location e:\utils }
function docs: { set-location e:\documents }
function pdf: { set-location e:\documents\pdf }

In TCC, I have the same defined, but as aliases;
Code:
utils:=E:\utils
docs:=e:\documents
pdf:=e:\documents\pdf

Now, when I want to change to a folder in TCC or PowerShell, I do, for example;
Code:
utils:

Same command, different shells.

My PowerShell Profile contains several other functions that emulate what TCC does.

Joe
 
It probably would not look like tcmd. Firstly, there was an update in windows 2000. But since then, microsoft has been trying to push people onto powershell, or vbasicscript or whatever. There has been plenty of room to interface with the windows shell, but this has largely not happened.

For example, to emulate changing to a shell directory, I use frank westlake's conset. Not only do you have the choice of the standard shell folders, you can make up your own. so "cdf email" opens up the email download directory, and "cdf source" opens up the page to the source of my webpage.
That's not what I'm saying.

My point is that if MS had continued active development, it would pretty much look like TCMD. For instance, several years ago I suggested to JPSoft adding Library functionality, which is pretty much universal in modern languages--that's how that got added.

A lot of older "power users" feel comfortable with MS batch file-type programming but not Powershell, C++, Python, or other newer languages that require compilation, etc.

My original post is really more about from a JPSoft marketing perspective.
 
Given what they did to cmd.exe in 2000 (see the extensions), i would more likely suggest that it would not have gone further that way: cryptic addons to replace functions.

In the days of DOS 123, you wrote macros in the menu language, such as /FSname~ There was a secret /X menu which gave you some programming features. With Windows 3.1, everyone wanted to write their own programming language, and use the native commands as some kind of external object.

The same is true for the likes of VBA and PS etc. Have a look at drwatsn32's PS code, which reads the environment, against what I use in cmd.exe .CMD files, with Westlakes 'conset.exe' utility.

This little CDF.CMD will not only chdir to the public and user folders, but alternately open it in explorer, as well as open the registry for you to refresh your mind as to what directory is what. It's not limited to Microsoft's own list, you can add your own under Software\Wendy\Folders This is done in the master setup suite, which also controls such delights as creating a second menu WinOS2. (We use shortcht.exe from the windows nt 4 sp 2 resource kit).

Microsoft's path has to be to direct users into some of the more acrane programs, totally divorced from the application at hand. The change was pretty sudden, which is why VBA was called "virus basic for applications", and that virus scanners had to start checking for front-door hacks in programs with some autoexec function in the documents.

IBM got as far as the REXX glue language. It can be insane too, but it's quite small, portable, and can work as a STDIO filter if needed. You can call externals to do the heavy lifting, and nothing runs 'automatically'.




Code:
@echo off
:: cd shell folder.
if /i "%1"=="/?" goto :ttyhelp
if /i "%1"=="" goto :ttyhelp
set zdir=
set zshf=Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
set zapp=Software\Microsoft\Windows\CurrentVersion\App Paths
if /i "%1"=="/m" goto :hklm
if /i "%1"=="/u" goto :hkcu
if /i "%1"=="/w" goto :hkwe
if /i "%1"=="/i" goto :image
if /i "%1"=="/a" goto :happ
set zcmd=chdir
set zhere=%*
if "%1"=="/o" set zcmd=open
if "%1"=="/o" set zhere=%zhere:~3%
conset /q /k zdir=HKLM\%zshf%\%zhere%
if not "%zdir%"=="" goto :doit
conset /q /k zdir=HKCU\%zshf%\%zhere%
if not "%zdir%"=="" goto :doit
conset /q /k zdir=HKLM\Software\Wendy\Folders\%zhere%
if not "%zdir%"=="" goto :doit
goto :end

:hklm
shelexec reg:hklm\%zshf%
goto :end
:hkcu
shelexec reg:hkcu\%zshf%
goto :end
:hkwe
shelexec reg:hklm\software\wendy\folders
goto :end
:happ
shelexec reg:hklm\%zapp%
goto :end
:image
set zdir=Microsoft\Windows NT\CurrentVersion\Image File Execution Options
shelexec reg:hklm\software\%zdir%
goto :end

:ttyhelp
echo CDF changes to a directory stored in registry, or shell folder.
echo.
echo   /o  Open the named folder in explorer.
echo   /m  Display the shell folders in the machine tree
echo   /u  Display the shell folders in the user tree
echo   /w  Display the folders in HKLM\Software\Wendy\Folders
echo   /i  Display the image settings tree for hacks etc.
echo.
echo  name  Changes to first instance of name in the above order.
goto :end

:dexe
goto :end

:doit
set zcxm=
if %zcmd%==chdir cd /d %zdir%
if %zcmd%==open shelexec %zdir%
:end
set zdir=
 
Back
Top
[FOX] Ultimate Translator
Translate