I have got the path using the following:
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
But the path I get is this:
C:\Users\test\AppData\Roaming\MetaQuotes\Agent-127.0.0.1-3000\Better_Result\Check\Libraries\x64
I want to replace this Agent-127.0.0.1-3000
with Latest
. The Phrase Agent-127.0.0.1-3000
is not fixed but it always starts with Agent
.
Hence, please let me know what I can do.
The final output I want is:
C:\Users\test\AppData\Roaming\MetaQuotes\Latest\Better_Result\Check\
I do not want Libraries\x64 also.
Please let me know.