Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
Set in Commands of MS-DOS Commands
6446 Views
Define SET command in MS DOS 
SET command is used in two ways. one way is read a string to the variable from console by /p mode, this will prompt string from the end-user and another way is eval the expression using /a mode.

SET /a expression
SET /a c=a+b

SET /p variable=Prompt value label
SET /p a=Enter the a value

Just assign string using SET command like below.
SET name=Knowledgewalls
Example of SET command
@echo off

SET a=20
SET b=30

SET /a c=a+b
ECHO C value is %c%
Output 
C value is 50
Next Topics
Next lessons of current book.
Commands of MS-DOS Commands
Commands of MS-DOS Commands
Commands of MS-DOS Commands
Commands of MS-DOS Commands
Previous Topics
Previous lessons of current book.
Commands of MS-DOS Commands
Commands of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details