What happens with CreateDirectory if the directory already exists? Also, how can you check if a directory exists?
What happens with CreateDirectory if the directory already exists? Also, how can you check if a directory exists?
The function returns 0 and GetLastError equates to ERROR_ALREADY_EXISTSOriginally posted by golfinguy4
What happens with CreateDirectory if the directory already exists?
Originally posted by golfinguy4
Also, how can you check if a directory exists?
Try the above?
You can also browse the parent directory with FindFirstFile()/FindNextFile(), it will also report directories, (check the file attributes field, directories have FILE_ATTRIBUTE_DIRECTORY set).
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Thanx Fordy and adrianxw, that was exactly what I was looking for.