Latest web development tutorials

วิธี GetParentFolderName ASP

อ้างอิงวัตถุ FileSystemObject อ้างอิงวัตถุ FileSystemObject สมบูรณ์

ชื่อวิธี GetParentFolderName ส่งกลับเส้นทางที่ระบุในโฟลเดอร์แม่ของส่วนผสมสุดท้ายไฟล์

ไวยากรณ์

FileSystemObject.GetParentFolderName(path)

参数 描述
path 必需的。需返回其父文件夹名称的文件或文件夹的路径。


ตัวอย่าง

<%
dim fs,p
set fs=Server.CreateObject("Scripting.FileSystemObject")
p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur")
Response.Write(p)
set fs=nothing
%>

输出:

c:\winnt\cursors


อ้างอิงวัตถุ FileSystemObject อ้างอิงวัตถุ FileSystemObject สมบูรณ์