Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to recognize string in txt file and set it as variable

$
0
0

Hi, 

I have txt file and somwhere in it string starting with:

data directory....:

How (using batch file) find it in the text, read and set the value as a variable? I mean the string is:

data directory....: c:\datadir

where what I mean value is  in this case "c:\datadir". So I want batch file to read the txt file, find string starting with "data directory....:" and then set "c:\datadir" as a variable. 

Best, mac


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>