ASP Attributes Attribute
Paghahayag at Gamit
Ang Attributes attribute ay ginagamit upang itakda o ibalik ang attribute ng tinukoy na file o folder.
Syntaxa:
FileObject.Attributes[=newattributes] FolderObject.Attributes[=newattributes]
Parametro | Paglalarawan |
---|---|
newattributes |
Optional. Tatakda ang halaga ng attribute ng file o folder. Maaaring maging alinman sa mga sumusunod o kombinasyon ng mga sumusunod na halaga:
|
Mga halimbawa para sa File object
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\test.txt") Response.Write("Ang mga katangian ng file ay: ") Response.Write("}}")f.Attributes) set f=nothing set fs=nothing %>
Output:
Ang mga katangian ng file ay: 32
Mga halimbawa para sa Folder object
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\test") Response.Write("Ang mga katangian ng folder ay: ") Response.Write("}}")fo.Attributes) set fo=nothing set fs=nothing %>
Output:
Ang mga katangian ng folder ay: 16