I have a problem using the DeleteFile function in Delphi 2006.
I am using the following code:
I have checked and the argument does represent a valid file.
The function returns false.
GetLastError returns 0 (no error)
The file has not been opened by the function I call DeleteFile from. It has been opened and read by a function called by this function but it is closed before the function terminates.
Also, I copy the file almost immediately before trying to delete it.
Help!!!!!
I am using the following code:
Code:
DeleteFile(path + '\' + rec.name);
I have checked and the argument does represent a valid file.
The function returns false.
GetLastError returns 0 (no error)
The file has not been opened by the function I call DeleteFile from. It has been opened and read by a function called by this function but it is closed before the function terminates.
Also, I copy the file almost immediately before trying to delete it.
Help!!!!!