get the size of a file
#include
#include
#include
#include
int main()
{
int fp;
long file_size;
if ((fp = open(”f:/cprojects/urls.txt”, O_RDONLY)) == -1)
printf(”Error opening the file n”);
else
{
file_size = filelength(file_handle);
printf(”The file size in bytes is %ldn”, file_size);
close(fp);
}
return 0;
}
Related posts:
- exe file information #include struct EXEHEAD { char id[2]; // ‘M’ & ‘Z’...
- A file example #include #include const char *FILENAME = “myfile.txt”; int main() {...
- fat file system information #include #include void main(void) { struct fatinfo fat; getfatd(&fat); printf(”Sectors...
- Another file example #include #include int main() { // first lets output to...
- file attributes #include #include int main() { int mode; /*check a files...
Related posts brought to you by Yet Another Related Posts Plugin.






















