I have a button that opens a file in a exe, what I would like to do is check to make sure this file exist before starting the exe. How could I accomplish this? Any help would be greatly appreciated.
I am a tad rusty on my C++ and this is a legacy application using C++ 6.0 and windows xp...
here is my code ..
void CJunkView::OnCadkeyButton()
{
CString year = "Desktop";
CString fileName = "x.prt";
CString fileToOpen = "\"C:\\Documents and settings\\Administrator\\" + year +"\\" + fileName + "\"";
CString exePath = "\"C:\\CK19\\Ckwin.exe\"";
CString cmd = "start " + exePath + ", " + fileToOpen;
system (cmd.GetBuffer(cmd.GetLength() + 1));
}