#include <iostream>
using namespace std;
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <io.h>
int main()
{
_finddata_t file;
long lf;
//输入文件夹路径
if((lf = _findfirst("d:\\搜狗高速下载\\*.*", &file))==-1) //若将*.*改为*.txt,则会输出该文件夹下所有的txt文件名
cout<<"Not Found!"<<endl;
else{
//输出文件名
cout<<"file name list:"<<endl;
while(_findnext( lf, &file)==0){
cout<<file.name<<endl;
}
}
_findclose(lf);
getchar();
return 0;
}
using namespace std;
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <io.h>
int main()
{
_finddata_t file;
long lf;
//输入文件夹路径
if((lf = _findfirst("d:\\搜狗高速下载\\*.*", &file))==-1) //若将*.*改为*.txt,则会输出该文件夹下所有的txt文件名
cout<<"Not Found!"<<endl;
else{
//输出文件名
cout<<"file name list:"<<endl;
while(_findnext( lf, &file)==0){
cout<<file.name<<endl;
}
}
_findclose(lf);
getchar();
return 0;
}