I have a "Run.bat" file for running a java application.
I need to open it and change the "Java_Home" path and some other parameters.
Need suggestion and if possible some sample logic/code.
System.IO Namespace ()
The tools in that namespace is for handling file IO, such as reading and writing files. You can for example use the File.ReadAllText or ReadAllLines method.
For manipulation of strings the String class, as represented by the String data type, offer many methods.
For more advanced string handling, ie pattern matching using regular expressions, there is the Regex class.
Once done you can write the file using the corresponding File.Write methods as you did for File.Read.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.