VBScript FolderExist对象不支持此属性

VBScript FolderExist对象不支持此属性,vbscript,Vbscript,我正在编写vbScript,并尝试在创建文件夹之前验证文件夹是否存在。我在谷歌上搜索并找到了一些MSDN上应该可以工作的代码,但是它失败了,错误对象不支持oFSO.FolderExists语句中的这个属性。请参阅下面的代码 dirNameFE = InputBox("Enter the name of the Directory for the Front end Logs:","Front End Directory" ,"C:\LogFiles\FrontEnd") Set oFSO =

我正在编写vbScript,并尝试在创建文件夹之前验证文件夹是否存在。我在谷歌上搜索并找到了一些MSDN上应该可以工作的代码,但是它失败了,错误对象不支持oFSO.FolderExists语句中的这个属性。请参阅下面的代码

dirNameFE = InputBox("Enter the name of the Directory for the Front end Logs:","Front End Directory"  ,"C:\LogFiles\FrontEnd")

Set oFSO = CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExist(dirNameFE) then
    set objFolder = oFSO.CreateFolder(dirNameFE)
End If

谢谢你的帮助。

那是因为它是FolderExists谢谢你。真不敢相信我错过了。