Y
yuanlehong
Unregistered / Unconfirmed
GUEST, unregistred user!
我用下面的方法:
var fso:variant;
folder:variant;
files:variant;
thefolder:variant;
thefiles:variant;
thefilecounter:integer;
i:integer;
begin
fso:=createoleobject('scripting.filesystemobject');
thefolder:=fso.getfolder('c:/temp');
thefilecounter:=thefolder.files.count;
showmessage(inttostr(thefolder.files.count));
for i:=0 to thefilecounter-1 do
listbox1.Items.Add(thefolder.files.name);
它执行时,能显示文件数目的对框,但执行最后的语句时,出现 the parameter is incorrect的
错误,期待各高手指点。
var fso:variant;
folder:variant;
files:variant;
thefolder:variant;
thefiles:variant;
thefilecounter:integer;
i:integer;
begin
fso:=createoleobject('scripting.filesystemobject');
thefolder:=fso.getfolder('c:/temp');
thefilecounter:=thefolder.files.count;
showmessage(inttostr(thefolder.files.count));
for i:=0 to thefilecounter-1 do
listbox1.Items.Add(thefolder.files.name);
它执行时,能显示文件数目的对框,但执行最后的语句时,出现 the parameter is incorrect的
错误,期待各高手指点。