Skip to content

Instantly share code, notes, and snippets.

@MareArts
Last active January 5, 2017 00:21
Show Gist options
  • Save MareArts/0e2bf230974d3a741dfa13ee345b63d3 to your computer and use it in GitHub Desktop.
Save MareArts/0e2bf230974d3a741dfa13ee345b63d3 to your computer and use it in GitHub Desktop.
If file exist then delete the file, example source code in MFC
http://study.marearts.com/2017/01/in-mfc-file-exist-check-and-delete-file.html
#include "afx.h"
CFileStatus fs;
if (CFile::GetStatus(_T("AutoLogIn.CPR"), fs))
{
::DeleteFile(_T("AutoLogIn.CPR") );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment