Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
Concat in String manipulation of MS-DOS Commands
22179 Views
How to concat strings in ms dos commands 
Concat string is directly done with variables without assigning any character inbetween strings because variables are surrounded by %.

string1 has John, string 2 has Peter going to merge string1 and string2 to string3 variable.
SET string3=First name: %string1%; Last name: %string2%;
Example
@echo off
SET string1=John
SET string2=Peter

SET string3=First name: %string1%; Last name: %string2%;

ECHO %string3%
SET /p exit=Bye
Result 
Next Topics
Next lessons of current book.
Things to Know of MS-DOS Commands
Previous Topics
Previous lessons of current book.
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation 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