VBScript FolderExist对象不支持此属性

时间:2015-10-16 20:29:19

标签: vbscript

我正在编写vbScript并尝试在创建文件夹之前验证该文件夹。我已经用Google搜索并在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

感谢您的帮助。

0 个答案:

没有答案