I would change your size variable to something much larger than a char. I'm thinking your OS will have a default variable type for use with file sizes, and your compiler will support that type, also.
Originally Posted by munna_dude
The 100/n refers to how often you might want your progress bar to show progress, as the file (or files) is (are) being moved, I believe. I think of it as 1/100th or 1%.
In your copy loop:
It looks nice if the progress bar has at least 10 char's in it's width, and no more than 30.
i = 0
while there are more bytes to be copied
i += 10
fgets() or fread() say 512 bytes, if available
and write it to the new file
fprintf() or fwrite()
if( bytes copied * 100 > i * total bytes to be copied)
print another progress char (ASCII char 176, 177, 178 in text mode, recommended).