Created
February 19, 2023 18:58
-
-
Save itssoap/511c8c951b5b2cb87ff3af4e61bdfbf0 to your computer and use it in GitHub Desktop.
An attempt to make simple aliases in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set temp1= | |
set temp2= | |
set _strings=%* | |
echo %_strings% | |
for /f "tokens=1 delims==" %%a in ("%_strings%") do ( | |
set aliasname=%temp1%%%a | |
set temp1=%aliasname% | |
) | |
for /f "delims== tokens=1*" %%A in ("%_strings%") do ( | |
set aliasvalue=%output2%%%B | |
set temp2=%aliasvalue% | |
) | |
echo %aliasname% | |
echo %aliasvalue% | |
echo @echo off > C:/alias/%aliasname%.bat | |
echo %aliasvalue% %%* >> C:/alias/%aliasname%.bat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alias ld=ls -ld
ld
and see if the new alias is made properly