📄 fileprocess.c
字号:
#include "stdafx.h"
#include "windows.h"
#include "Lambda.h"
#include "fstream.h"
#include "iomanip.h"
#include "math.h"
int FileFind(char * lpPath)
{
char szFile[80];
WIN32_FIND_DATA FindFileData;
strcpy(szFile,lpPath);
strcat(szFile,"\\*.*");
HANDLE hFind=::FindFirstFile(szFile,&FindFileData);
if(INVALID_HANDLE_VALUE == hFind) return 0;
//
while(TRUE)
{
if(FindFileData.dwFileAttributes& FILE_ATTRIBUTE_DIRECTORY )
{
if(FindFileData.cFileName[0]!='.')
{
strcpy(szFile,lpPath);
strcat(szFile,"\\");
strcat(szFile,FindFileData.cFileName);
cout<<"The following are the files in the dorctory "<<szFile<<endl;
FileFind(szFile);
}
}
else
{
cout <<"Process the current file : "<<FindFileData.cFileName<<endl;
// The user add your code here
}
if(!FindNextFile(hFind,&FindFileData))
break;
}
FindClose(hFind);
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -