Batch Script – Create String
Last Updated :
19 Dec, 2021
In this article, we are going to learn how to create a String using Batch Script.
Batch Script :
@echo off
set str=Geeks for Geeks
echo %str%
pause
- By using ‘ set ‘ we are getting input of any 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 :
Output
As we can clearly see that our string is created.
Share your thoughts in the comments
Please Login to comment...