我是VBscript的新手,并且努力学习所有概念.在我练习期间,我感到疑惑.
dim a,b,c
set a = CreateObject("scripting.filesystemobject") 'initiate the file system object'
set b = a.GetFolder("E:\test") 'returns a object . and for the instance that varaiable b refers to that returned object'
c = b.datecreated 'accesing and storing the property to a variable /C/'
msgbox "folder: " &c
Run Code Online (Sandbox Code Playgroud)
当我执行此时没有错误消息,它工作正常.但是当我改变的时候
c = b.datecreatedTO set c = b.datecreated比
它显示了这个错误:
> object required:'datecreated'
Run Code Online (Sandbox Code Playgroud)
我知道这是一件基本的事情,但有些时候小事情会让你学到很多东西,对未来有所帮助.