hello!
well I am under XP using VC++6.
So, I need to get the file size of a bunch of files into char[].
later token holds all the file names I need.Code://Declaration of token: char *token[512] = {0};
The way for getting a file's size I use is:
but using a for loop doesnt work, it shows the very same value for every token[i].Code:WIN32_FILE_ATTRIBUTE_DATA wfad; GetFileAttributesEx(TEXT("File.txt"), GetFileExInfoStandard, &wfad); printf("Size of File.txt is %u\n", wfad.nFileSizeHigh);
so if I use:
it will show the same number for all the token[J].Code://say the number of files is 16 for (int J=0;J<=15;J++) { WIN32_FILE_ATTRIBUTE_DATA wfad; GetFileAttributesEx(TEXT(token[J]), GetFileExInfoStandard, &wfad); printf("Size-> %u\n", wfad.nFileSizeHigh); }//for
how can I store the file sizes in token[] to a char[]??? (lets name it FileSizes[])
also if anyone knows what is nFileSizeHigh and nFileSizeLow that would hel me understand better what's going on.
thanks a lot! =D



LinkBack URL
About LinkBacks


