VBS教程:屬性-Path 屬性
更新時(shí)間:2006年11月16日 00:00:00 作者:
Path 屬性
返回指定文件、文件夾或驅(qū)動(dòng)器的路徑。
object.Path
object 應(yīng)為 File、Folder 或 Drive 對(duì)象的名稱。
說(shuō)明
對(duì)于驅(qū)動(dòng)器,路徑不包含根目錄。例如,C 驅(qū)動(dòng)器的路徑是 C:,而不是 C:\。
以下代碼舉例說(shuō)明如何使用 Path 屬性:
Function ShowFileAccessInfo(filespec) Dim fso, d, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = UCase(f.Path) & "<BR>" s = s & "
創(chuàng)建時(shí)間:" & f.DateCreated & "<BR>"
s = s & "
上次訪問(wèn)時(shí)間:" & f.DateLastAccessed & "<BR>"
s = s & "
上次修改時(shí)間:" & f.DateLastModified
ShowFileAccessInfo = s
End Function
相關(guān)文章
vbs shellcode轉(zhuǎn)換escape加密
用vbs轉(zhuǎn)換加密代碼2008-05-05