The text file will be having just one word("1234" or "password" ), now I'm looking for a way to give this content of the text file to an environment variable
Sign up to request clarification or add additional context in comments.
Comments
2
Use below for loop syntax. Replace filename with your filename, or environmental variable.
If this code is supposed to be put inside a batch file, replace % with %%, as %%t.
for /F %t in (filename) Do (
echo %t
:: Do whatever else you want to do with %t
)