I’ve two methods. One is for image comparison and one is for file reading. what i do is I call a process that compares images between two folders and creates a logfile. Now the second method reads that logfile and parse the data.
But when i call the second method, it says, file not exist, this is because the exe take a little time to make the logfile.
I have used Thread.Sleep() but it still don’t work, neither i can use that file.exist method as if i use it and if file does not exist then it will skip that method/file which i don’t want.
I’ve two methods. One is for image comparison and one is for file reading.
Share
You can use Process.WaitForExit to wait until your first process is finished, then you know when your log file will be complete/exist when calling your second method.