delphi获取指定路径下的exe文件名称
found:=FindFirst(sSetUpFolderUNC_PATH+'*.*',faAnyFile,SearchRec);whilefound=0dobegini...
found:=FindFirst(sSetUpFolderUNC_PATH +'*.*',faAnyFile,SearchRec);
while found=0 do
begin
if (SearchRec.Name<>'.') and (SearchRec.Name = '.exe') and (SearchRec.Name<>'..') and (SearchRec.Attr<>faDirectory)
then
if sFileList = ''then
begin
sFileList :=SearchRec.Name;
end
else
begin
sFileList := sFileList + ',' + SearchRec.Name;
end;
found:=FindNext(SearchRec);
end;
system.SysUtils.FindClose(SearchRec);
我这样取不到任何名字,有没有大佬指点哪里错了 展开
while found=0 do
begin
if (SearchRec.Name<>'.') and (SearchRec.Name = '.exe') and (SearchRec.Name<>'..') and (SearchRec.Attr<>faDirectory)
then
if sFileList = ''then
begin
sFileList :=SearchRec.Name;
end
else
begin
sFileList := sFileList + ',' + SearchRec.Name;
end;
found:=FindNext(SearchRec);
end;
system.SysUtils.FindClose(SearchRec);
我这样取不到任何名字,有没有大佬指点哪里错了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询