This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/findnext.c

20 lines
451 B
C

#include <stdio.h>
#include <io.h>
void main()
{
struct _finddata_t fileinfo;
long handle;
int rc;
/* Display name and size of "*.c" files */
handle = _findfirst( "*.c", &fileinfo );
rc = handle;
while( rc != -1 ) {
printf( "%14s %10ld\n", fileinfo.name,
fileinfo.size );
rc = _findnext( handle, &fileinfo );
}
_findclose( handle );
}