Thuộc tính Name trong ASP
Định nghĩa và cách sử dụng
Thuộc tính Name được sử dụng để thiết lập hoặc trả về tên của tệp hoặc thư mục cụ thể.
cú pháp:
FileObject.Name[=newname] FolderObject.Name[=newname]
tham số | mô tả |
---|---|
newname | tùy chọn. Định nghĩa tên tệp hoặc thư mục. |
thực thể
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("d:\test.txt") Response.Write("Tên tệp: ") Response.Write(f.Name) set f=nothing set fs=nothing %>
Kết quả xuất ra:
Tên tệp: test.txt