?
本文檔使用 php中文網(wǎng)手冊(cè) 發(fā)布
JScript? | 語(yǔ)言參考 |
返回指定文件或文件夾所在驅(qū)動(dòng)器的驅(qū)動(dòng)器號(hào)。 只讀。
object.Drive
object 應(yīng)為 File 或 Folder 對(duì)象。
下面的代碼說(shuō)明了 Drive 屬性的用法:
function ShowFileAccessInfo(filespec) {
???var fso, f, s;
???fso = new ActiveXObject("Scripting.FileSystemObject");
???f = fso.GetFile(filespec);
???s = f.Name + " on Drive " + f.Drive + "<br>";
???s += "
創(chuàng)建時(shí)間:" + f.DateCreated + "<br>";
???s += "
最近一次訪問(wèn)時(shí)間:" + f.DateLastAccessed + "<br>";
???s += "
最近一次修改時(shí)間:" + f.DateLastModified;
???return(s);
}
Attributes 屬性 | DateCreated 屬性 | DateLastAccessed 屬性 | DateLastModified 屬性 | Files 屬性 | IsRootFolder 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortName 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性
應(yīng)用于: File 對(duì)象 | Folder 對(duì)象