I am taking a day or two off from my world editor to build a simple (actually, rebuild) temporary file remover, which will delete all the files in "WindowsTEMP" and in any of it's subfolders, as well as the actual subfolder. I have two questions about this though. When FindFirstFile or FindNextFile return, they only return the file or directory name, and I need the full drive and path to delete files and subfolders. Second, can a function call on itself? The way I plan on doing it is this (this is my actual code so far):
void remove(char place)
fn = FindFirstFile(place, &fd);
if(fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
First get the full path and directory name
Now call remove() with that info
Once it returns, you can delete the empty folder!
//Just delete the file, if not a dir
//Code in a loop with FindNextFile here!
void clean(HWND cwnd)
if(strstr(paths, "Not used.") == NULL)
Can somebody please help me out with this? I appreciate it.
0 · ·