Anyone can help ??

My program cannot read the long file name under NT.

e.g. if the file name is "input.txt" , it can work.
However, if the file name is "input20020331.txt" , it cannot.

Anything wrong ????

Below is my prog.

-------------------------------------------------------------------------------
/*
program to split file content into two files
*/

#include <stdio.h>
#include <string.h>

#define INFILE_WIDTH 3000
#define MAX_LINE 60000

void main(int argc, char *argv[])
{
FILE *in_file;
FILE *out_file1;
FILE *out_file2;
char linebuf[INFILE_WIDTH + 1];
char outfilename1[40];
char outfilename2[40];
char extension[20];
char prefix[40];
char suffix[40];
int ext_pos = 0 ;
int i, filename_len;

char infilename[40];
float cut_line = MAX_LINE;


int j=0;
float line_count = 0;

float out_count1 =0;
float out_count2 =0;

strcpy(infilename,argv[1]);

if (argc >= 2 ) {
// This line is not work ..........!!!!!!!!!!!!!
if ((in_file = fopen(argv[1],"r")) == NULL)
{
printf("Cannot open file %s\n", argv[1]);
exit(8);
}

filename_len = strlen((char *)argv[1]);
prefix[0]='\0';
suffix[0]='\0';
for (i=0; i < filename_len; i ++)
{
if((ext_pos == 0) && (argv[1][i]=='.'))
ext_pos = i;

if(ext_pos > 0)
{
suffix[j++]=argv[1][i];
suffix[j]='\0';
}
else
{
prefix[i]=argv[1][i];
prefix[i+1]='\0';
}
}


sprintf((char *)outfilename1,"%s1%s", prefix, suffix);
sprintf((char *)outfilename2,"%s2%s", prefix, suffix);

if ((out_file1 = fopen(outfilename1,"w+"))== NULL)
{
printf("Error create file %s\n", outfilename1);
exit(8);
}
if ((out_file2 = fopen(outfilename2,"w+"))== NULL)
{
printf("Error create file %s\n", outfilename2);
exit(8);
}



if (argc > 2)
cut_line = atof(argv[2]);


while (fgets(linebuf, INFILE_WIDTH, in_file) != NULL)
{
line_count +=1;
if (line_count <= cut_line)
{
fputs((char *)linebuf, out_file1);
out_count1 +=1;
}
else
{
fputs((char *)linebuf, out_file2);
out_count2 +=1;
}

linebuf[0]='\0';
}

fclose(in_file);
fclose(out_file1);
fclose(out_file2);

printf("\nSource :%s (%.0f lines)",argv[1],line_count);
printf("\nOutput :%s (%.0f lines)",outfilename1,out_count1);
printf("\n :%s (%.0f lines)",outfilename2,out_count2);

}
else
{
printf("\n\n");
printf("\n----------------------------------------------------------------");
printf("\nDesc : This program is used to split file content into two files on PC");
printf("\n\nSPLIT.EXE [filename] [line_no]");
printf("\n\n filename - source file name");
printf("\n\n line_no - optional");
printf("\n - max. no of lines in the first output file");
printf("\n - default 60000");

}
}