2006년 03월 20일
모든파일이름 얻어오기
#include <stdio.h>
#include <io.h>
void main()
{
long hFile;
struct _finddata_t stFileInfo;
hFile = _findfirst("C:*.*", &stFileInfo);
//해당파일이 없으면..
if (-1L == hFile)
{
return;
}
do {
//검색한 파일명출력
printf("%sn", stFileInfo.name);
//다음파일찾기
} while (0 == _findnext(hFile, &stFileInfo));
}
#include <io.h>
void main()
{
long hFile;
struct _finddata_t stFileInfo;
hFile = _findfirst("C:*.*", &stFileInfo);
//해당파일이 없으면..
if (-1L == hFile)
{
return;
}
do {
//검색한 파일명출력
printf("%sn", stFileInfo.name);
//다음파일찾기
} while (0 == _findnext(hFile, &stFileInfo));
}
# by | 2006/03/20 17:51 | ▣ 컴터야그 ▣ | 트랙백 | 덧글(0)





☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]