Windows only
-
Navigate to any path on your computer, for instance, your user's folder
C:\users\USERNAME\
1.1 or just enter
%userprofile%
-
At your specified path, create a folder like
my-custom-cmd
. In there you start creating you .bat-files -
Now you need to register the created folder to your environment variables on windows
3.1 I would suggest adding it to the already existing PATH variable
3.2 If you don't know how just add your windows version to this google search ;)
-
/Woohoo/ now just re-/open your console of choice and be happy about your custom commands!
4.1 How? Just type in the names of the created .bat-files like
> gc
if you have a gc.bat file ++PS: I would suggest also making this a git-repo for yourself, as git repos are awesome for common reasons++
- Follow the Create for yourself section until step #3
- Clone this repo into there like
git clone https://github.com/mt-webdev/custom-cmd-commands.git
- Keep following the Create for yourself instructions from step #3.1
As you can see in the files deploy-a1.bat
and deploy-a2.bat
I am executing some .ps1 (PowerShell) scripts.
I use those for some more complex scenarios and it works just fine!
To print your existing custom commands onto the screen like in the screenshot at the top have a look into custom-cmd.bat
.
Also i created a code-cmd command which launches my editor of choice (VS Code) to easily modify my commands.
Using something like the mentioned > gc
command requires you to specify a parameter which is passed into the .bat-file. For further readings check out these super old MSF Docs or just search for it.
I really appreciate your support and interest in making every one of us more productive and efficient in using the console. If you feel like i am missing some awesome shortcut feel free to hit me up with a PR :)
Also, I am aware of some better 'All-In-One' solutions but I like having this setup as my backup which I can use on any PC, without much of an effort.