You are not logged in.

#1 03 Aug 2020 11:51

Tei_tsubaki
Member
Registered: 28 Jul 2020
Posts: 7

Is there any way to add new command in cmd?

I want to add a new command in cmd.
Any good idea?
cool

Offline

#2 04 Aug 2020 01:37

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 205

Re: Is there any way to add new command in cmd?

Any executable (either a program or a script) that's in one of the folders listed in echo %PATH% can be run from anywhere on the computer. Make a script that does something you want and add that script to one of those folders.

Offline

#3 08 Aug 2020 10:36

Minecraft49
Member
From: Poland
Registered: 08 Aug 2020
Posts: 10
Website

Re: Is there any way to add new command in cmd?

To quickly add your own CMD command, type:

echo @[equivalent command] >c:\windows\[yourcommandname].bat

Example:

echo @dir >c:\windows\listdirectory.bat

Last edited by Minecraft49 (20 Nov 2020 17:13)

Offline

#4 08 Aug 2020 10:38

Minecraft49
Member
From: Poland
Registered: 08 Aug 2020
Posts: 10
Website

Re: Is there any way to add new command in cmd?

Sorry, not dir but @dir.

Offline

#5 29 Aug 2020 18:01

mikeyww
Member
Registered: 29 Aug 2020
Posts: 5

Re: Is there any way to add new command in cmd?

You can also just use CALL to execute commands in a file instead of in a subroutine. You can easily pass any needed parameters to the file.

Offline

#6 05 Sep 2020 00:47

Tei_tsubaki
Member
Registered: 28 Jul 2020
Posts: 7

Re: Is there any way to add new command in cmd?

Thanks for the comment. I will try the above suggest. smile

Offline

Board footer

Powered by