How to add commands to cmd

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Rileyh
Posts: 147
Joined: 01 Sep 2011 03:54
Location: Perth, Western Australia

How to add commands to cmd

#1 Post by Rileyh » 08 Oct 2011 21:29

Hi,
I want to make my cmd easier to use and so I want to add some more commands.
Could you tell me how to make more commands available to me?

Regards,
Rileyh

alleypuppy
Posts: 82
Joined: 24 Apr 2011 19:20

Re: How to add commands to cmd

#2 Post by alleypuppy » 09 Oct 2011 09:25

You can create batch files that do specific things and then place them in the System32 folder.

For instance, you can create a command that deletes your internet cookies by making a batch file that contains something like this:

Code: Select all

@ECHO OFF
   IF EXIST "%APPDATA%\Microsoft\Windows\Cookies" (PUSHD "%APPDATA%\Microsoft\Windows"
   (DEL "Cookies\*.*" /A /F /Q /S > NUL 2> NUL
   ECHO Cookies deleted!
   POPD
   EXIT /B
   ))
   ECHO No cookies to delete!
   EXIT /B
Then, just save it in the System32 folder and name it whatever you want. No matter what directory you are in, you can type the name of the file and it will execute, just like a command.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: How to add commands to cmd

#3 Post by Ed Dyreen » 11 Oct 2011 19:55

'
I want to make my cmd easier to use and so I want to add some more commands.
There are many, and here's one:
My/our contribution, a function definitions list :arrow:
viewtopic.php?f=3&t=1893

Post Reply