China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-26 09:46
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Question about reading the list of a shared directory on a 2000 server in TC2? View 671 Replies 2
Original Poster Posted 2003-07-19 00:00 ·  中国 四川 眉山 电信
中级用户
★★
Credits 355
Posts 99
Joined 2003-01-06 00:00
23-year member
UID 690
Gender Male
Status Offline
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;
Floor 2 Posted 2003-07-19 00:00 ·  中国 陕西 西安 教育网
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
Your guess is correct, check some books about 2000.
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Floor 3 Posted 2003-07-23 00:00 ·  中国 四川 眉山 电信
中级用户
★★
Credits 355
Posts 99
Joined 2003-01-06 00:00
23-year member
UID 690
Gender Male
Status Offline
Are there any other workaround methods to use it?
Forum Jump: