Hello,
I am trying to delete a directory. However, the DeleteFile and unlink functions have not ceased to stop failing. I am using the Windows API function FindFileNext in a while statement to list all the available files in specified directoy (which happens to contain more directories). It is these directories that I want to delete. Am I not closing the handle somewhere? And Yes, the program did create these directories I am trying to delete.
/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...
I am trying to delete a directory. However, the DeleteFile and unlink functions have not ceased to stop failing. I am using the Windows API function FindFileNext in a while statement to list all the available files in specified directoy (which happens to contain more directories). It is these directories that I want to delete. Am I not closing the handle somewhere? And Yes, the program did create these directories I am trying to delete.
Code:
[green]//This is the end of the code that circulates through a directory[/green]
FindClose(h);
CloseHandle(h);
[green]
The directory does exist and is the correct name.
Also, GetFileAttributes on the entry returns positive
[/green]
Record.Format("%s\\%s\\%s\\,blah,blah2,blah3);
_unlink(Record);
[blue]or[/blue]
DeleteFile(Record);
/**************
Me: When will the project be finished?
Them: What project?
Me: The one you have been working on for the last 3 years!
Them: Ohh, we can't finish it?
Me: Why?
Them: We don't know how to program...