2837Views6Replies
How to make a custom CMD window have custom commands (or commands at all)
Hey guys, I made a simple cmd program:
@echo off
color 0a
title %CD%
echo DBAC(R) Windows DOS
echo (C)Copyright DBAC 2009+
echo.
:CMD
set /p cmd=%CD%^>
%cmd%
goto CMD
I just have a question: How do I give it commands? Where do I tell it where to find them? If anybody knows, comment please!
Thank you!
EDIT: Resolved.
@echo off
color 0a
title %CD%
echo DBAC(R) Windows DOS
echo (C)Copyright DBAC 2009+
echo.
:CMD
set cmd=
set /p cmd=%CD%^>
if not defined cmd goto CMD
call "%CD%"\Commands\%cmd%
echo %cmd%>"%CD%\Commands_Log\%cmd%
goto CMD
Comments
Best Answer 11 years ago
Figured it out. You make it call the variable which in this case is %cmd%.
Answer 11 years ago
You should be able to award yourself "Best answer".
L
Answer 11 years ago
Haha thanks.
Answer 11 years ago
No I mean it. There should be a blue button for you to click by your original comment. Go get it.
L
Answer 11 years ago
Thank you very much, you're awesome!
Answer 11 years ago
Yea! there you go.
L