'检查该目录下有无要生成的文件,无则从其子文件夹中复制一份并改名
Set fso = CreateObject("Scripting.FileSystemObject")
if (fso.FileExists("c:\abc.mdb")=false then
fso.copyfile "c:\temp\temp.mdb","c:\abc.mdb"
end if
使用 文件对象.FileExists("想找的文件名全称")
语句为
Set fsObj = Server.CreateObject("Scripting.FileSystemObject")
'利用上面的语句建立文件对象
'利用FileSystemObject物件的FileExists方法檢查檔案是否存在
if fsObj.FileExists("欲找的文件全名")=false then
创建文件
end if