Batch Script – Create String
In this article, we are going to learn how to create a String using Batch Script.
Batch Script :
@echo off set str=Beginner for Beginner echo %str% pause
- By using ‘ set ‘ we are getting input of any string.
- Ex: set str=input string
- In the next line, we are using ‘ echo %str% ‘ for printing our input string.
- Then we are using ‘pause’ , to hold the screen until any key is pressed, so that we can read our output.
Output :
As we can clearly see that our string is created.