3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Advanced Batch

Step 2SET Command - String Theory (1/4)

SET Command - String Theory (1/4)
The SET Command: The Variable Definer.

Ah. Variables. The developer's ambrosia. Variables are bits of memory which are... err, variable. No IFs ANDs or NOTs about it! (lol, sorry). Ok! So how's this baby work?

Very simply, the parameters of the SET command are:

SET VariableName=Variable Value

SET by itself will create string variables.

SET TestVS=Test Variable String!

In this case, we just stored the value "Test Variable String!" into the variable TestVS.
Well that's all fun and games, but how do we retrieve the variable value? We use %.

Just add % around the variable name.

ECHO %TestVS%

Ok cool, but what else can it do?
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Feb 9, 2010. 6:23 PMgraboy says:
^^ I think I'm the only person who got the IF's AND's or NOT's thing. "NOR" does anyone other than us know what were talking about.
Aug 17, 2010. 7:22 AMFiles says:
:o I think I got it too. "IF" "AND" "NOT"
Feb 10, 2011. 1:22 PMwill421 says:
I GOT IT TOO!
IF you thought they were batch commands AND NOT just in regular old all caps, you got it!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
5
Author:Neodudeman