Here's what we do in an older program. Before the program gets to this point, the user inserts a floppy disk (1.44mb) and if it has any existing files on it, the user is prompted to erase all files on it. If the user does not, then he/she is prompted to insert another floppy disk before continuing and the same check is performed, etc. An array is created that contains all files that will be copied to floppy. It sums up the space required for each file and checks to make sure there is enough space on the floppy disk before copying. Typically our files are so small that they all fit on one floppy. However, for your purpose, you could do something similar but try different combinations of the files listed in the array to determine how best to spread them unto floppy disks. Of course if a file is too big, it won't be able to be copied regardless.
=ADIR(gaexpfiles,tdir+"*.csv")
=ASORT(gaexpfiles)
PRIVATE lntot, lctot
lctot=""
lntot=0
FOR i = 1 TO ALEN(gaexpfiles,1)
IF UPPER(TYPE('gaexpfiles(i,2)'))="N"
lctot=lctot;
+PADR(ALLTRIM(gaexpfiles(i,1)),25,'.');
+PADL(ALLTRIM(STR(gaexpfiles(i,2))),25,'.');
+CHR(13)
lntot=lntot+gaexpfiles(i,2)
ENDIF
ENDFOR
lctot=lctot+'Total Free Space Required : '+ALLTRIM(STR(lntot))+CHR(13)
lctot=lctot+'Space on your Floppy Drive: '+'1384576'+CHR(13)+CHR(13)
PRIVATE tcfile
IF lntot>1384576
MESSAGEBOX(lctot;
+'Not enough space on floppy disk to copy files.'+CHR(13);
+'Click OK to Abort this Operation and Return'+CHR(13);
,16, 'ERROR - Insufficient space on floppy drive.')
ELSE
ENDIF
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"