An old program I wrote before could only read directories in NT4.
I guess it has to do with partition size and the 2000 system. So in TC2, is it no longer possible to use the findfile statement to read the directory list of a shared directory on a 2000 server?
The code segment is as follows:
chdir(pathname); /*switch to the specified directory*/
done=findfirst("*.*",&ffblk,16);done=findnext(&ffblk);done=findnext(&ffblk);
/*remove . and ..*/
for(f_end=0;!done
{ /*loop to get filenames*/
if (f_end>75) break;
if (ffblk.ff_attrib==16) /*skip non-directories*/
{
strcpy(menu_dir,ffblk.ff_name); /*store directories into menu_dir*/
}
done=findnext(&ffblk);
}
if (f_end<3) {
hprintf("There must be no fewer than three game subdirectories in the directory!",4);
getch();closegraph();exit(74);
}
for(i=1;i<f_end;i++)
{
for(j=1;jmenu_dir)
{
strcpy(temp_dir ,menu_dir);
strcpy(menu_dir,menu_dir);
strcpy(menu_dir,temp_dir );
strcpy(temp_dir ,menu_des);
strcpy(menu_des,menu_des);
strcpy(menu_des,temp_dir );
}
}
}
for(i=1;i<f_end+1;i++)
{
itoa(i,menu_des,10);
if(i<10) strcat(menu_des," ."
;else strcat(menu_des,"."
;
strcat(menu_des,menu_dir); /*change the comment to the directory name*/
}
shift=0;
I guess it has to do with partition size and the 2000 system. So in TC2, is it no longer possible to use the findfile statement to read the directory list of a shared directory on a 2000 server?
The code segment is as follows:
chdir(pathname); /*switch to the specified directory*/
done=findfirst("*.*",&ffblk,16);done=findnext(&ffblk);done=findnext(&ffblk);
/*remove . and ..*/
for(f_end=0;!done

{ /*loop to get filenames*/
if (f_end>75) break;
if (ffblk.ff_attrib==16) /*skip non-directories*/
{
strcpy(menu_dir,ffblk.ff_name); /*store directories into menu_dir*/
}
done=findnext(&ffblk);
}
if (f_end<3) {
hprintf("There must be no fewer than three game subdirectories in the directory!",4);
getch();closegraph();exit(74);
}
for(i=1;i<f_end;i++)
{
for(j=1;jmenu_dir)
{
strcpy(temp_dir ,menu_dir);
strcpy(menu_dir,menu_dir);
strcpy(menu_dir,temp_dir );
strcpy(temp_dir ,menu_des);
strcpy(menu_des,menu_des);
strcpy(menu_des,temp_dir );
}
}
}
for(i=1;i<f_end+1;i++)
{
itoa(i,menu_des,10);
if(i<10) strcat(menu_des," ."
;else strcat(menu_des,"."
;strcat(menu_des,menu_dir); /*change the comment to the directory name*/
}
shift=0;


