I'm creating a text file at executablePath location.
Path.GetDirectoryName(Application.ExecutablePath) + "\\Paths.txt";
The application works perfectly fine, but for some weird reason when I check the executable directory, the text file is not there.
I have a feeling that it creates the file at some other location, but I can't seem to find it.
I'm creating the file like this;
string PathsDirectory =Path.GetDirectoryName(Application.ExecutablePath)+"\\Paths.txt";
TextWriter tw = new StreamWriter(PathsDirectory);
tw.WriteLine(Data);
tw.Close();
And reading it like this;
string PathsDirectory =Path.GetDirectoryName(Application.ExecutablePath)+"\\Paths.txt";
TextReader tr = new StreamReader(PathsDirectory);
string line;
while ((line = tr.ReadLine()) != null)
{
}
I checked the path after concat and everything looks fine except I can't see the file there.
Ok finally I found the file it's inside;
C:\Users\Alican\AppData\Local\VirtualStore\Program Files (x86)\MyMovies\MyMovies
insted of
C:\Program Files (x86)\MyMovies\MyMovies