09-26-2007 10:22 PM
09-27-2007 02:16 AM
@Deepu wrote:
HiIn one of my applications, I am deleting a file which was previously opened for writing. While running the source code, it is working fine. But when running the executable, the file still exist there (and there is no error message prompted).If I open the file only for reading, there is no problem deleting it while running the executable.Any idea what could be going wrong here ? After each opening, I do call the file close as well.Thanks in advance.
Deepu,
You ve mentioned that while running the source code it is working fine, meaning that the error dialog pops-up while the file is getting deleted after being kept open physically. There is a big difference between a file being opened by LV to write to it or read from it and us keep opening the file physically to read or write. So, please dont get confused between them.
But while running the EXE, it is getting deleted sans any error msg, means eithrer it should be a non-readonly file or a file without a proper file extension. Otherwise, you should ve connected the error-out wire to some node like to the seq frame or something like that.But my last assumption gets eliminated because you ve already mentioned that the error msg pops out when run from the source code.
Do you write the file without any extension? That may be a possibility for Windows to allow a file to be deleted albiet its being kept opened physically.
One last question. Do you want to delete the file or you DONT want it to be so ?
09-27-2007 08:15 PM