Sunday, 23 June 2019

Batch: String concatenation


String data type is used to display text, it is a collection of characters.

How to concatenate strings?
Syntax
%string1%%string2%....%stringN%

Example
C:\>set firstName=Krishna

C:\>set lastName=Ponnam

C:\>set name=%firstName% %lastName%

C:\>echo %name%
Krishna Ponnam



Previous                                                 Next                                                 Home

No comments:

Post a Comment