vb6中验证一个文件是否存在的代码是什么
用什么代码可以验证如 c:\ 中有没一个 a.exe 的文件
有就xxxx,没有就yyyyy,要怎么写?谢谢
[解决办法]
if dir ( "d:\a.exe ")= " " then
msgbox "没有文件 "
else
msgbox "有文件 "
end if
[解决办法]
if len(dir ( "d:\a.exe ")) <=0 then
msgbox "没有文件 "
else
msgbox "有文件 "
end if
[解决办法]
if createobject( "scripting.filesystemobject ").fileexists( "d:\a.txt ") then
msgbox "有 "
else
msgbox "无 "
end if