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