Attribute Name ของ ASP
การกำหนดและการใช้งาน
Attribute Name ใช้เพื่อตั้งค่าหรือกู้ค่าชื่อแฟ้มหรือโฟลเดอร์ที่กำหนด
รูปแบบการใช้งาน:
FileObject.Name[=newname] FolderObject.Name[=newname]
ตัวแปร | คำอธิบาย |
---|---|
newname | ในบางกรณี กำหนดชื่อแฟ้มหรือโฟลเดอร์ |
ตัวอย่าง
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("d:\test.txt") Response.Write("ชื่อแฟ้ม: ") Response.Write(f.Name) set f=nothing set fs=nothing %>
การออกมา:
ชื่อแฟ้ม: test.txt