2777Views6Replies

Author Options:

How to make a custom CMD window have custom commands (or commands at all) Answered

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

Discussions

Figured it out. You make it call the variable which in this case is %cmd%.

You should be able to award yourself "Best answer".

L

No I mean it. There should be a blue button for you to click by your original comment. Go get it.

L