中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-15 23:59
47,813 topics / 349,903 posts / today 1 new / 48,258 members
DOS疑难解答 & 问题讨论 (解答室) » Question about reading the list of a shared directory on a 2000 server in TC2?
Printable Version  727 / 2
Floor1 9zhmke Posted 2003-07-19 00:00
中级用户 Posts 99 Credits 355
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;
Floor2 lemonhall Posted 2003-07-19 00:00
高级用户 Posts 183 Credits 639
Your guess is correct, check some books about 2000.
Floor3 9zhmke Posted 2003-07-23 00:00
中级用户 Posts 99 Credits 355
Are there any other workaround methods to use it?
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023