Click to See Complete Forum and Search --> : Passing to DeleteFile
Chris_SE
Dec 12th, 2000, 10:05 AM
is there a way to pass the full path of a file returned by FindNextFile? Is it in the WIN32_FIND_DATA?
Benjamin
Dec 12th, 2000, 02:08 PM
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;
it should be
DeleteFile(NAME_OF_VARIABLE.cFileName);
or
DeleteFile(NAME_OF_VARIABLE->cFileName);
I can't remember which it is...
Chris_SE
Dec 13th, 2000, 10:42 AM
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 :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.