// Written by Kannaiyan for File Joining
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
FILE *fp,*dfp;
unsigned long i;
unsigned long filelen;
char fileformation[20];
dfp = fopen("dest.exe","wb");
if ( dfp == NULL )
{
printf(" Destination File could not be formed ");
return;
}
for(i=0;;i++)
{
ltoa(i,fileformation,10);
strcat(fileformation,".spt");
fp = fopen(fileformation,"rb");
if( fp == NULL )
{
fclose(dfp);
fclose(fp);
return;
}
fseek(fp,0,2);
filelen = ftell(fp);
fseek(fp,0,0);
while( filelen )
putc(getc(fp),dfp),filelen--;
fclose(fp);
}
}