Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File size
Message
From
06/12/2001 11:47:48
 
 
To
06/12/2001 07:56:08
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00590442
Message ID:
00590597
Views:
28
>How can I calculate size of any file in bytes? I need to copy number of files to a diskette and I wanna determine if is enough disk space on a diskette.
>
>Thanks in advance.

Note that calculating required disk space is not a simple as checking file sizes, other factors may need to be considered.

In addition to the actual file size, be aware that you may need to know about how much space the file needs on the destination disk.

For example : if the destination diskette is a standard DOS formatted diskette, the cluster size is 512 bytes, so a file from 1-512 bytes in size will take up 512 bytes, from 513-1024 bytes will take 1024 bytes etc. So if you have 100 files of 10 bytes each, rather than taking up 1000 bytes on the disk, 51200 bytes will be required.

Also note, that if you are copying file structures, then the directories (folders) that you copy may also be stored as files & will also take up disk space.
Len Speed
Previous
Reply
Map
View

Click here to load this message in the networking platform