Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpsgpa!plim From: plim@hpsgpa.HP.COM (Peter Lim) Newsgroups: comp.sys.ibm.pc Subject: Re: Copying very large files Message-ID: <340029@hpsgpa.HP.COM> Date: 24 Nov 89 02:53:13 GMT References: <1380@ucf-cs.UCF.EDU> Organization: HP Singapore IC Design Ctr Lines: 47 Must you use 360K floppy ? May be your 3.3 machine only have 360K drive. If you have FASTBACK, I am pretty sure it can backup the file over several disks. Or if you have access to mkstk, the SPLIT utility can cut your file up into 360K chunks. Or worse come to worse, you can always write a small utility in C or Turbo Pascal to read binary file and cut it up; don't forget to write the utility to put them back together though. How about this: /* Should work in principle but might not in practice, and is definitely very kludgy. I wrote this right here. Therefore I am not responsible for what it does. */ #include main() { FILE *fp, *fo; char name[]="bigfile"; char oname[200]; int k,i,f; int each=350; /* each file to be 350 K */ fp = fopen (name, "rb"); /* "b" for binary mode in MSDOS */ for (f=i=k=0; (ch = getc (fp)) != EOF; ) { if (k == 0) { if (f != 0) { fclose (fo); } sprintf (oname, "file.%d", f); fo = fopen (oname, "wb"); } putc (ch, fo); i++; if (i = 1024) { i = 0; k++; } if (k = each) { k = 0; f++; } } /* for */ fclose (fp); fclose (fo); }