Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C program to list files in directory
SUBMITTED BY:
Guest
DATE:
Jan. 21, 2014, 11:14 p.m.
FORMAT:
Text only
SIZE:
418 Bytes
Raw
Download
Tweet
HITS:
1210
Go to comments
Report
#include <stdio.h>
#include <conio.h>
#include <dir.h>
int main()
{
int done;
struct ffblk a;
printf("Press any key to view the files in the current directory\n");
getch();
done = findfirst("*.*",&a,0);
while(!done)
{
printf("%s\n",a.ff_name);
done = findnext(&a);
}
getch();
return 0;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus