Ever typed a batch but got sick of how long it took because of the repetitive typing? Lets make some shortcuts
When you use a command, basically you are starting a file with certain attributes. To find out where all of these files are located, open CMD, and type path. It will display all of the possible locations that a command could be located. 99.99% of the time, however, they are located in the System32 folder, which is located in the C:\Windows folder. This is where we will put ours, A command is basically a batch file that takes the user defined attributes and changes the computer in the intended way. To do this, you must use the variables %1, %2, %3, ... etc. We will not use %0 because that would just return the filename of the command. To begin, start notepad. Now write your command in the file. Here I have a few examples. (Hint: You will want to begin each line with an @ so it will not display the process)
Wait- Since my computer does not currently feature a wait command, I made one myself.
@echo off
if %1 EQU ? GOTO SYNTAX
PING 1.1.1.1 /n 1 /w %1 >NUL
GOTO END
:SYNTAX
ECHO WAIT xxxxx
echo xxxxx Number of millaseconds to wait
:end
When you save your command, you want to save it as the word you want the command to be. Ex. wait.bat = Wait. Save as type: "All files". Now, up at the top, navigate to C:\, then C:\Windows, C:\Windows\System32. Now you can save your command.
Make your own cmd prompt Commands
Moderator: DosItHelp
-
- Posts: 40
- Joined: 25 Jan 2008 14:05
-
- Posts: 12
- Joined: 10 Oct 2008 04:50
Errrr..
I not understand at all what is the purpose of these command.. Create my own command? How?