//Show 8.2 FAT filenames
//By DreamVB 11:56 AM 20-Sep-16

#include <iostream>
#include <Windows.h>
using namespace std;
using std::cout;
using std::endl;

string GetShortName(string lzPath){
	char fName[MAX_PATH] = {0};
	//Get short path filename
	if(GetShortPathNameA(lzPath.c_str(),fName,MAX_PATH) != 0){
		return fName;
	}
	return "";
}

int main(int argc, char *argv[]){
	string lzLName = "C:\\work\\EasyPHP-DevServer-14.1VC11\\EasyPHP-DevServer-14.1VC11.exe";

	//Output long path and short path filenames
	cout << "Long Path   : " << lzLName.c_str() << endl;
	cout << "Short Path  : " << GetShortName(lzLName).c_str() << endl;
	//Keep the console windows open
	system("pause");

	return 0;
}