我对 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
当我执行此操作时,没有错误消息并且工作正常。但是当我改变
c = b.datecreated
比set c = b.datecreated
_
它显示了这个错误:
> object required:'datecreated'
我知道这是一件基本的事情,但有时小事情会让你学到很多东西,对未来有帮助。