is there a way to pass the full path of a file returned by FindNextFile? Is it in the WIN32_FIND_DATA?
Printable View
is there a way to pass the full path of a file returned by FindNextFile? Is it in the WIN32_FIND_DATA?
it should beCode:typedef struct _WIN32_FIND_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
TCHAR cFileName[ MAX_PATH ];
TCHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATA, *PWIN32_FIND_DATA;
I can't remember which it is...Code:DeleteFile(NAME_OF_VARIABLE.cFileName);
or
DeleteFile(NAME_OF_VARIABLE->cFileName);
Thanks Dennis, btw its .cFilename not ->, isn't -> only for mfc apps?
I have no clue... I haven't done much API in C++,
Anyway,
Glad I was of help to ya :)