送分!! 菜鸟问题 给定文件的路径名 如何得到 路径下所有文件名和文件数量 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用directoryBox和FileListdirectoryBox.drivc='d';directoryBox.directory='\ff\';directoryBox.FileList:=FileList1;FileList1.count=文件数;FileList1.items=所有文件名 楼上的,这一句directoryBox.FileList:=FileList1;是不是应该改为FileList1 := directoryBox.FileList; 超级猛料:procedure findall(disk,path: String; var fileresult: Tstrings); varfpath: String;fs: TsearchRec;beginfpath:=disk+path+'\*.*';if findfirst(fpath,faAnyFile,fs)=0 thenbeginif (fs.Name<>'.')and(fs.Name<>'..') thenif (fs.Attr and faDirectory)=faDirectory thenfindall(disk,path+'\'+fs.Name,fileresult)elsefileresult.add(disk+strpas(strupper(pchar(path)))+'\'+strpas(strupper(pchar(fs.Name)))+'('+inttostr(fs.Size)+')');while findnext(fs)=0 dobeginif (fs.Name<>'.')and(fs.Name<>'..') thenif (fs.Attr and faDirectory)=faDirectory thenfindall(disk,path+'\'+fs.Name,fileresult)elsefileresult.add(disk+strpas(strupper(pchar(path)))+'\'+strpas(strupper(pchar(fs.Name)))+'('+inttostr(fs.Size)+')');end;end;findclose(fs);end; 用FindFirstFile和FindNextFile 加个循环就可以了 1、FindFirstFile和FindNex。2、》》》》》》》》》 如何将CSV文件的数据导入到ACESS数据库中 请教:网页内容搜索问题?? 急求解决方法,请路过的大侠帮帮我! 如何把另一表单中的字段插入到当前表的字段中? WEB Service客户端并发运行时出现的难题!!!百思不得其解,请高手指教。 小工具,针对d5、6、7 delphi里数据库中的事务 是怎么一会事啊!他和事件有什么区别啊!在什么时候用到事务呢? 这样定义的有何区别? 有偿写一个小软件 怎样在代码中判断某个Table中的那些Field 是必填的? 求救,请各位指教!!! 从TWinControl基类上自建组件
directoryBox.drivc='d';
directoryBox.directory='\ff\';
directoryBox.FileList:=FileList1;
FileList1.count=文件数;
FileList1.items=所有文件名
这一句directoryBox.FileList:=FileList1;
是不是应该改为FileList1 := directoryBox.FileList;
procedure findall(disk,path: String; var fileresult: Tstrings);
varfpath: String;fs: TsearchRec;beginfpath:=disk+path+'\*.*';if findfirst(fpath,faAnyFile,fs)=0 thenbeginif (fs.Name<>'.')and(fs.Name<>'..') thenif (fs.Attr and faDirectory)=faDirectory thenfindall(disk,path+'\'+fs.Name,fileresult)elsefileresult.add(disk+strpas(strupper(pchar(path)))+'\'+strpas(strupper(pchar(fs.Name)))+'('+inttostr(fs.Size)+')');while findnext(fs)=0 dobeginif (fs.Name<>'.')and(fs.Name<>'..') thenif (fs.Attr and faDirectory)=faDirectory thenfindall(disk,path+'\'+fs.Name,fileresult)elsefileresult.add(disk+strpas(strupper(pchar(path)))+'\'+strpas(strupper(pchar(fs.Name)))+'('+inttostr(fs.Size)+')');end;end;findclose(fs);end;
2、》》》》》》》》》