Code: #include <dirent.h>
#include <string.h>
#include <Windows.h>
#include <iostream>
#include <fstream>
int isdirorfile(char *ch);
void showme();
using namespace std;
int main (int argc, char *argv[])
{
if(argc < 2){showme();Sleep(2000);exit(0);}
system("mode con cp select=857");
system("cls");
for(int i = 1;i < argc;i++)
{
if(isdirorfile(argv[i]) == 0)
{
if(remove(argv[i]) != 0)cout << "Hata" << endl;
cout << argv[i] << " --- File Deleted \n" << endl;
Sleep(200);
}
else if (isdirorfile(argv[i]) == 1)
{
if(rmdir(argv[i]) != 0)cout << "Hata" << endl;
cout << argv[i] << " --- Folder Deleted \n" << endl;
Sleep(200);
}
}
showme();
Sleep(2000);
return 0;
} int isdirorfile(char *ch)
{
int len = strlen(ch);
if(ch[len - 5] == '.')return 0;
else if(ch[len - 4] == '.')return 0;
else if(ch[len - 3] == '.')return 0;
else if(ch[len - 2] == '.')return 0;
else return 1;
}
void showme()
{
system("title D34dkn16h7 -- COD3R.ORG");
cout << "d8888b. d8888b. j88D d8888b. db dD d8b db db dD db db d88D" << endl;
cout << "88 `8D VP `8D j8~88 88 `8D 88 ,8P' 888o 88 o88 d8' 88 88 VP d8'" << endl;
cout << "88 88 oooY' j8' 88 88 88 88,8P 88V8o 88 88 d8' 88ooo88 d8'" << endl;
cout << "88 88 ~~~b. V88D 88 88 88`8b 88 V8o88 88 d8888b. 88~~~88 d8'" << endl;
cout << "88 .8D db 8D 88 88 .8D 88 `88. 88 V888 88 88' `8D 88 88 d8'" << endl;
cout << "Y8888D' Y8888P' VP Y8888D' YP YD VP V8P VP `8888P YP YP d8'" << endl<< endl;
cout << "COD3R.org --- <? echo \"Programlama Sanattir\" ?>" << endl << endl;
}