#include <windows.h>
#include <windowsx.h>
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
CreateDirectory("My1",NULL);
SetCurrentDirectory("My1");
cout << "Directory My1 was created." << " Press Enter";
getchar();
CreateFile("1.txt",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,
CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);
CreateFile("2.bin",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,
CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);
CreateFile("3.bin",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,
CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);
cout << "\nThese files were created : 1.txt, 2.bin, 3.bin." << " Press Enter";
getchar();
//DeleteFile("3.bin");
if (DeleteFile("3.bin")!=0)
cout << "File 3.bin was deleted." << " Press Enter";
else
cout << "Error." << " Press Enter";
getchar();
return 0;
}