user-0 提问: vs2010中可以完全代替么，为什么引用了，findfirst还是无法使用

回复:
user: user-0
content: 引用 3 楼 qq2060792279 的回复:我是来打酱油的，这种论坛居然还有酱油。

user: user-1
content: 我是来打酱油的

user: user-0
content: 引用 1 楼 zhao4zhong1 的回复:_findfirst, _findfirsti64, _wfindfirst, _wfindfirsti64 Provides information about the first instance of a filename that matches the file specified in the filespec argument.  long _findfirst( char *filespec, struct _finddata_t *fileinfo );  __int64 _findfirsti64( char *filespec, struct _finddata_t *fileinfo );  long _wfindfirst( wchar_t *filespec, struct _wfinddata_t *fileinfo );  __int64 _wfindfirsti64( wchar_t *filespec, struct _wfinddata_t *fileinfo );  Function Required Header Compatibility  _findfirst <io.h> Win 95, Win NT  _findfirsti64 <io.h> Win 95, Win NT  _wfindfirst <io.h> or <wchar.h> Win NT  _wfindfirsti64 <io.h> or <wchar.h> Win NT    For additional compatibility information, see Compatibility in the Introduction.  Libraries  LIBC.LIB Single thread static library, retail version  LIBCMT.LIB Multithread static library, retail version  MSVCRT.LIB Import library for MSVCRT.DLL, retail version    Return Value  If successful, _findfirst and _wfindfirst return a unique search handle identifying the file or group of files matching the filespec specification, which can be used in a subsequent call to _findnext or _wfindnext, respectively, or to _findclose. Otherwise, _findfirst and _wfindfirst return –1 and set errno to one of the following values:  ENOENT  File specification that could not be matched  EINVAL  Invalid filename specification  Parameters  filespec  Target file specification (may include wildcards)  fileinfo  File information buffer  Generic-Text Routine Mappings  TCHAR.H Routine  _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined  _tfindfirst _findfirst _findfirst _wfindfirst  _tfindfirsti64 _findfirsti64 _findfirsti64 _wfindfirsti64    System Calls Routines |  _find, _wfind Function Overview   system("dir /b /a-d c:\\*.* >d:\\allfiles.txt"); //读文件d:\\allfiles.txt的内容即C:\\下所有文件的名字 system("dir /b /a-d /s c:\\*.* >d:\\allfilesinsub.txt"); //读文件d:\\allfilesinsub.txt的内容即C:\\下所有文件的名字包含子目录 system("dir /b /ad  c:\\*.* >d:\\alldirs.txt"); //读文件d:\\alldirs.txt的内容即C:\\下所有子目录的名字 请记住，能用shell命令获取文件、文件夹信息或者操作文件、文件夹最好用shell命令获取或者操作，而不要用各种API获取或者操作，因为当遇到非法文件夹名或非法文件名或非法文件长度、非法文件日期、压缩文件、链接文件、稀疏文件……等各种意料之外的情况时，API会处理的不全面或陷入死循环，而shell命令不会。  第一眼吓一跳，留着慢慢看了。。。

user: user-2
content: _findfirst, _findfirsti64, _wfindfirst, _wfindfirsti64 Provides information about the first instance of a filename that matches the file specified in the filespec argument.  long _findfirst( char *filespec, struct _finddata_t *fileinfo );  __int64 _findfirsti64( char *filespec, struct _finddata_t *fileinfo );  long _wfindfirst( wchar_t *filespec, struct _wfinddata_t *fileinfo );  __int64 _wfindfirsti64( wchar_t *filespec, struct _wfinddata_t *fileinfo );  Function Required Header Compatibility  _findfirst <io.h> Win 95, Win NT  _findfirsti64 <io.h> Win 95, Win NT  _wfindfirst <io.h> or <wchar.h> Win NT  _wfindfirsti64 <io.h> or <wchar.h> Win NT    For additional compatibility information, see Compatibility in the Introduction.  Libraries  LIBC.LIB Single thread static library, retail version  LIBCMT.LIB Multithread static library, retail version  MSVCRT.LIB Import library for MSVCRT.DLL, retail version    Return Value  If successful, _findfirst and _wfindfirst return a unique search handle identifying the file or group of files matching the filespec specification, which can be used in a subsequent call to _findnext or _wfindnext, respectively, or to _findclose. Otherwise, _findfirst and _wfindfirst return –1 and set errno to one of the following values:  ENOENT  File specification that could not be matched  EINVAL  Invalid filename specification  Parameters  filespec  Target file specification (may include wildcards)  fileinfo  File information buffer  Generic-Text Routine Mappings  TCHAR.H Routine  _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined  _tfindfirst _findfirst _findfirst _wfindfirst  _tfindfirsti64 _findfirsti64 _findfirsti64 _wfindfirsti64    System Calls Routines |  _find, _wfind Function Overview   system("dir /b /a-d c:\\*.* >d:\\allfiles.txt"); //读文件d:\\allfiles.txt的内容即C:\\下所有文件的名字 system("dir /b /a-d /s c:\\*.* >d:\\allfilesinsub.txt"); //读文件d:\\allfilesinsub.txt的内容即C:\\下所有文件的名字包含子目录 system("dir /b /ad  c:\\*.* >d:\\alldirs.txt"); //读文件d:\\alldirs.txt的内容即C:\\下所有子目录的名字 请记住，能用shell命令获取文件、文件夹信息或者操作文件、文件夹最好用shell命令获取或者操作，而不要用各种API获取或者操作，因为当遇到非法文件夹名或非法文件名或非法文件长度、非法文件日期、压缩文件、链接文件、稀疏文件……等各种意料之外的情况时，API会处理的不全面或陷入死循环，而shell命令不会。