//DirExists By ~DreamVB~

#include <iostream>
#include <sstream>
#include <fstream>
#include <stdio.h>
#include <Windows.h>

using namespace std;
using std::cout;
using std::endl;

bool DirExists(char *filename){
	//Check if a file was found.
	if (GetFileAttributesA(filename) == INVALID_FILE_ATTRIBUTES){
		return false;
	}
	if (!(GetFileAttributesA(filename) & FILE_ATTRIBUTE_DIRECTORY)){
		return false;
	}
	return true;
}

int main(int argc, char* argv[]){
	char *File = "C:\\work\\docs";

	//Look for the file.
	if (!DirExists(File)){
		cout << File << " Was Not Found." << endl;
	}
	else{
		cout << File << " Was Found." << endl;
	}

	system("pause");

	return 1;
}