/*DO NOT RUN - NOT COMPLETE*/ #include #include #include #include struct fatinfo { char fi_sclus; /* sectors per cluster */ char fi_fatid; /* the FAT id byte */ int fi_nclus; /* number of clusters */ int fi_bysec; /* bytes per sector */ }; struct fatinfo sdinfo,tdinfo;/*source & target disk information*/ int drvval(int dr) { if(_chdrive(dr)==-1) return(0); else return(1); } void main() { FILE *fp,*fc; int dno; char ch,*fn="TXXXXXX",*p,srd; clrscr(); dno=getdisk(); printf("CURRENT DRIVE: %c",65+dno); printf("ENTER SOURCE DRIVE LETTER: "); srd=getche(); if(drvval(atoi(&srd))) { printf("\nInvalid Source Drive! Aborting..."); exit(EXIT_FAILURE); } int86x p=mktemp(fn); if((fp=fopen("c:\\netlog.txt","r"))!=NULL&&(fc=fopen(p,"w"))!=NULL) { while(!feof(fp)) { ch=getc(fp); putc(ch,stdout); putc(ch,fc); } fclose(fp); fclose(fc); printf("The ASCII text has been dumped in "); puts(p); } else printf("\nFILE ERROR!"); setdisk(dno); }