Step 5SET Command - More Than Meets The Eye (4/4)
Have you tried just typing a variable by itself?
SET Test=Instructables%Test%
What a weird error... it says that the command "Instructables" is not recognized, not that %Test% had no syntax. So that means that DOS treats each variable like it was typed by hand. Well, what if...
SET Test=START cmd.exe%Test%
Awesome! It worked!
DOS treats each variable like it was typed by the user, and runs it accordingly. Here's an interesting code: (Just Copy/Paste; it's a bit tedious.)
@ECHO OffSET Variable1=ECSET Variable2=HSET Variable3=O CSET Variable4=ooSET Variable5=l!ECHO %Variable1%%Variable2%%Variable3%%Variable4%%Variable5%ECHO.%Variable1%%Variable2%%Variable3%%Variable4%%Variable5%Pause
Isn't that neat? Each variable contains two letters of the entire message (except Variable2), and putting the variables in order, each letter adds up, and finishes the entire command of ECHO Cool!
The SET command is one of the more complicated, and powerful commands of the DOS dictionary.
| « Previous Step | Download PDFView All Steps | Next Step » |
2
comments
|
Add Comment
|
![]() |
Add Comment
|


















































