創(chuàng)建文件夾。
object.CreateFolder(foldername)
object
必選項(xiàng)。應(yīng)為 FileSystemObject 對(duì)象的名稱。
foldername
必選項(xiàng)。字符串表達(dá)式,指明要?jiǎng)?chuàng)建的文件夾。
如果指定的文件夾已經(jīng)存在,則會(huì)出現(xiàn)錯(cuò)誤。
下面例子舉例說(shuō)明如何使用 CreateFolder 方法:
Function CreateFolderDemo Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.CreateFolder("c:/New Folder") CreateFolderDemo = f.PathEnd Function
新聞熱點(diǎn)
疑難解答
圖片精選